queue

package
v1.21.17 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Queue

type Queue[T any] struct {
	// contains filtered or unexported fields
}

func NewQueue

func NewQueue[T any](nlimit int, tlimit time.Duration, handler func([]T)) *Queue[T]

func (*Queue[T]) Done added in v1.20.23

func (q *Queue[T]) Done() <-chan struct{}

func (*Queue[T]) HasStopped added in v1.20.23

func (q *Queue[T]) HasStopped() <-chan struct{}

func (*Queue[T]) Push

func (q *Queue[T]) Push(item T) bool

func (*Queue[T]) Run

func (q *Queue[T]) Run()

func (*Queue[T]) Stop

func (q *Queue[T]) Stop()

type QueueConfig

type QueueConfig[T any] struct {
	Handler       func([]T)
	FlushInterval time.Duration
	FlushCount    int
}

Jump to

Keyboard shortcuts

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