queue

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WaitForClose

func WaitForClose(q Instance, timeout time.Duration) error

WaitForClose blocks until the Instance has stopped processing tasks or the timeout expires. If the timeout is zero, it will wait until the queue is done processing. WaitForClose an error if the timeout expires.

Types

type Instance

type Instance interface {

	// HasSynced returns true once the queue has synced.
	// Syncing indicates that all items in the queue *before* Run was called have been processed.
	HasSynced() bool
	// contains filtered or unexported methods
}

func NewQueue

func NewQueue(errorDelay time.Duration) Instance

NewQueue instantiates a queue with a processing function

func NewQueueWithID

func NewQueueWithID(errorDelay time.Duration, name string) Instance

func NewWithSync

func NewWithSync(f func(), name string) Instance

NewQueue instantiates a queue with a processing function

type Task

type Task func() error

Task to be performed.

Jump to

Keyboard shortcuts

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