Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DelayQueueOption ¶
type DelayQueueOption func(*delayQueue)
DelayQueueOption configure the behavior of the queue. Must be applied before Run.
func DelayQueueBuffer ¶
func DelayQueueBuffer(bufferSize int) DelayQueueOption
DelayQueueBuffer sets maximum number of tasks awaiting execution. If this limit is reached, Push and PushDelayed will block until there is room.
func DelayQueueWorkers ¶
func DelayQueueWorkers(workers int) DelayQueueOption
DelayQueueWorkers sets the number of background worker goroutines await tasks to execute. Effectively the maximum number of concurrent tasks.
type Delayed ¶
type Delayed interface { PushDelayed(t Task, delay time.Duration) // contains filtered or unexported methods }
Delayed implements queue such that tasks are executed after a specified delay.
func NewDelayed ¶
func NewDelayed(opts ...DelayQueueOption) Delayed
NewDelayed gives a Delayed queue with maximum concurrency specified by workers.
type Instance ¶
type Instance interface { // HasSynced returns true once the queue has synced. // Syncing indicates that all items in the queue *before* Run was called have been processed. HasSynced() bool // contains filtered or unexported methods }
Click to show internal directories.
Click to hide internal directories.