types

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Requeuer

type Requeuer interface {
	Requeue()
	Dequeue() <-chan interface{}
}

Requeuer handle requeues/enqueues into a channel to allow job syncronization. There might be different implementations due to how the blocking aspect is handled.

func BufferedRequeuer

func BufferedRequeuer(size int) Requeuer

BufferedRequeuer returns a static buffered requeuer of a fixed size. After the number of sync requests overflow the size the Requeue() calls will be blocking

func ConcurrentRequeuer

func ConcurrentRequeuer(max int) Requeuer

ConcurrentRequeuer returns a dynamic requeuer of a maximum size. Requeue() will never be blocking, but when the maximum size is crossed we stop enqueueing

Jump to

Keyboard shortcuts

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