Documentation ¶
Overview ¶
Package queue provide a generic job queue.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Queue ¶
type Queue[J Job] interface { // Enqueue adds a job to the queue. Can be blocking until a slot is available. Enqueue(J) error // Dequeue returns a job from the queue. Blocking until a job is available. // The context can be used to set a timeout. Dequeue(ctx context.Context) (J, error) }
Queue is an interface for a generic job queue.
Click to show internal directories.
Click to hide internal directories.