queue

package
Version: v1.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WorkQueue

type WorkQueue interface {
	// GetWork dequeues and returns all ready items.
	GetWork() []types.UID
	// Enqueue inserts a new item or overwrites an existing item.
	Enqueue(item types.UID, delay time.Duration)
}

WorkQueue allows queuing items with a timestamp. An item is considered ready to process if the timestamp has expired.

func NewBasicWorkQueue

func NewBasicWorkQueue(clock clock.Clock) WorkQueue

NewBasicWorkQueue returns a new basic WorkQueue with the provided clock

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL