Documentation ¶
Overview ¶
Package policy provides tooling for creating and executing Benthos message batch policies.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Batcher ¶
type Batcher struct {
// contains filtered or unexported fields
}
Batcher implements a batching policy by buffering messages until, based on a set of rules, the buffered messages are ready to be sent onwards as a batch.
func New ¶
func New(conf batchconfig.Config, mgr bundle.NewManagement) (*Batcher, error)
New creates an empty policy with default rules.
func (*Batcher) Add ¶
Add a new message part to this batch policy. Returns true if this part triggers the conditions of the policy.
func (*Batcher) Count ¶
Count returns the number of currently buffered message parts within this policy.
Click to show internal directories.
Click to hide internal directories.