queue

package
v0.5.14 Latest Latest
Warning

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

Go to latest
Published: May 4, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotEnoughWorkers = fmt.Errorf("queue requires >= 1 workers")
View Source
var ErrQueueFull = fmt.Errorf("queue is full")

Functions

This section is empty.

Types

type Queue

type Queue interface {
	Enqueue(func(context.Context)) error // Adds item to the queue
	Start()                              // Starts the processing of the queue
	Stop()                               // Stops the processing of the queue
	IsFull() bool
}

Queue encapsulates the Enqueue method that will be called by a dispatcher

func NewGenericQueue

func NewGenericQueue(ctx context.Context, numWorkers int, maxQueueSize int) (Queue, error)

func NewMockQueue added in v0.3.0

func NewMockQueue() Queue

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL