Versions in this module Expand all Collapse all v0 v0.37.1 Dec 15, 2020 Changes in this version + const DefaultBufferedByteLimit + const DefaultBundleByteThreshold + const DefaultBundleCountThreshold + const DefaultDelayThreshold + var ErrOverflow = errors.New("bundler reached buffered byte limit") + var ErrOversizedItem = errors.New("item size exceeds bundle byte limit") + type Bundler struct + BufferedByteLimit int + BundleByteLimit int + BundleByteThreshold int + BundleCountThreshold int + DelayThreshold time.Duration + HandlerLimit int + func NewBundler(itemExample interface{}, handler func(interface{})) *Bundler + func (b *Bundler) Add(item interface{}, size int) error + func (b *Bundler) AddWait(ctx context.Context, item interface{}, size int) error + func (b *Bundler) Flush()