Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BackoffTask ¶
type BackoffTask struct {
// contains filtered or unexported fields
}
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 ¶
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 { // Push a task. Push(task Task) // Run the loop until a signal on the channel Run(<-chan struct{}) // Closed returns a chan that will be signaled when the Instance has stopped processing tasks. Closed() <-chan struct{} }
Instance of work tickets processed using a rate-limiting loop
func NewBackOffQueue ¶
func NewBackOffQueue(backoff *backoff.ExponentialBackOff) Instance
Click to show internal directories.
Click to hide internal directories.