Documentation
¶
Overview ¶
batcher is a package that provides a simple batching mechanism the buffer can be configured with a max capacity and a flush interval the buffer will invoke a callback function when the buffer is full or the flush interval is reached
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 }
type FlushCallback ¶
type FlushCallback[T any] func([]T)
FlushCallback is the callback function that will be called when the batcher is full or the flush interval is reached
Click to show internal directories.
Click to hide internal directories.