Versions in this module Expand all Collapse all v0 v0.1.1 Jan 19, 2024 v0.1.0 Jan 14, 2024 Changes in this version + type BatchProcessor func(ctx context.Context, jobs []Job) error + type Batcher struct + func NewBatcher[Job any](config *BatcherConfig, processor BatchProcessor[Job]) *Batcher[Job] + func (x *Batcher[Job]) Close() error + func (x *Batcher[Job]) Shutdown(ctx context.Context) (err error) + func (x *Batcher[Job]) Submit(ctx context.Context, job Job) (*JobResult[Job], error) + type BatcherConfig struct + FlushInterval time.Duration + MaxConcurrency int + MaxSize int + type JobResult struct + Job Job + func (x *JobResult[Job]) Wait(ctx context.Context) error