istio: istio.io/istio/pkg/queue Index | Files

package queue

import "istio.io/istio/pkg/queue"

Index

Package Files

delay.go instance.go

type DelayQueueOption Uses

type DelayQueueOption func(*delayQueue)

DelayQueueOption configure the behavior of the queue. Must be applied before Run.

func DelayQueueBuffer Uses

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 Uses

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 Uses

type Delayed interface {
    Instance
    PushDelayed(t Task, delay time.Duration)
}

Delayed implements queue such that tasks are executed after a specified delay.

func NewDelayed Uses

func NewDelayed(opts ...DelayQueueOption) Delayed

NewDelayed gives a Delayed queue with maximum concurrency specified by workers.

type Instance Uses

type Instance interface {
    // Push a task.
    Push(task Task)
    // Run the loop until a signal on the channel
    Run(<-chan struct{})
}

Instance of work tickets processed using a rate-limiting loop

func NewQueue Uses

func NewQueue(errorDelay time.Duration) Instance

NewQueue instantiates a queue with a processing function

type Task Uses

type Task func() error

Task to be performed.

Package queue imports 5 packages (graph) and is imported by 11 packages. Updated 2021-01-07. Refresh now. Tools for package owners.