batcher

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: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Batcher

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

func NewBatcher

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

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

func (b *Batcher[T]) Done() <-chan struct{}

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

func (b *Batcher[T]) HasStopped() <-chan struct{}

func (*Batcher[T]) Push

func (b *Batcher[T]) Push(item T) bool

func (*Batcher[T]) Run

func (b *Batcher[T]) Run()

func (*Batcher[T]) Stop

func (b *Batcher[T]) Stop()

Jump to

Keyboard shortcuts

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