package queue

Import Path
	golang.org/x/pkgsite/internal/queue (on go.dev)

Dependency Relation
	imports 19 packages, and imported by 4 packages

Involved Source Files Package queue provides queue implementations that can be used for asynchronous scheduling of fetch actions.
Package-Level Type Names (total 5, in which 3 are exported)
/* sort exporteds by: | */
GCP provides a Queue implementation backed by the Google Cloud Tasks API. ScheduleFetch enqueues a task on GCP to fetch the given modulePath and version. It returns an error if there was an error hashing the task name, or an error pushing the task to GCP. If the task was a duplicate, it returns (false, nil). *T : Queue
InMemory is a Queue implementation that schedules in-process fetch operations. Unlike the GCP task queue, it will not automatically retry tasks on failure. This should only be used for local development. ScheduleFetch pushes a fetch task into the local queue to be processed asynchronously. WaitForTesting waits for all queued requests to finish. It should only be used by test code. *T : Queue func NewInMemory(ctx context.Context, workerCount int, experiments []string, processFunc inMemoryProcessFunc) *InMemory
A Queue provides an interface for asynchronous scheduling of fetch actions. ( T) ScheduleFetch(ctx context.Context, modulePath, version, suffix string, disableProxyFetch bool) (bool, error) *GCP *InMemory func New(ctx context.Context, cfg *config.Config, queueName string, numWorkers int, expGetter middleware.ExperimentGetter, processFunc inMemoryProcessFunc) (Queue, error)
Package-Level Functions (total 4, in which 2 are exported)
New creates a new Queue with name queueName based on the configuration in cfg. When running locally, Queue uses numWorkers concurrent workers.
NewInMemory creates a new InMemory that asynchronously fetches from proxyClient and stores in db. It uses workerCount parallelism to execute these fetches.
Package-Level Constants (total 3, in which 2 are exported)