Versions in this module Expand all Collapse all v0 v0.0.1 Jul 2, 2024 Changes in this version + type Consumer interface + Consume func([]interface{}) + type KeyBatchProcessor interface + AdjustBatchMaxSize func(int) + AdjustBatchMaxWait func(duration int) + BufferNum func() int + KeyNum func() int + Run func() + Shutdown func() + TryPut func(string, interface{}) bool + func NewBatchProcessorWithKey(s int, c KeyConsumer, opts ...OptionFunc) KeyBatchProcessor + type KeyConsumer interface + Consume func(string, []interface{}) + type OptionFunc func(*options) + func WithBatchThresholdStrategy(n int) OptionFunc + func WithItemsWeightStrategy(calculator func(i interface{}) int, threshold int) OptionFunc + func WithMaxWaitStrategy(i time.Duration) OptionFunc + type Processor interface + AdjustBatchMaxSize func(int) + AdjustBatchMaxWait func(duration int) + Num func() int + Put func(interface{}) + Run func() + Shutdown func() + TryPut func(interface{}) bool + func NewBatchProcessor(s int, c Consumer, opts ...OptionFunc) Processor