Versions in this module Expand all Collapse all v0 v0.1.0 Nov 19, 2024 Changes in this version + func Validate(s any) error + type Buffer struct + func NewBuffer[T any, U any](opts BufferOpts[T, U]) *Buffer[T, U] + func (b *Buffer[T, U]) BuffItem(item T) (chan *FlushResponse[U], error) + func (b *Buffer[T, U]) Start() (func() error, error) + func (b *Buffer[T, U]) StartDebugLoop() + type BufferOpts struct + FlushFunc func(ctx context.Context, items []T) ([]U, error) + FlushPeriod time.Duration + L *zerolog.Logger + MaxCapacity int + MaxConcurrent int + MaxDataSizeInQueue int + Name string + SizeFunc func(T) int + WaitForFlush time.Duration + type FlushResponse struct + Err error + Result U