Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Batch ¶
type Batch struct { Group string Deflate bool Message *utils.Message Buf *bytes.Buffer Writer io.Writer MessageCount uint64 // Current number of messages in the buffer Done utils.Done // Call to pass the message to the next handler Timer *clock.Timer Sent bool }
Batch groups multiple messages
type Batcher ¶
type Batcher struct { Config // contains filtered or unexported fields }
Batcher allows to merge multiple messages in a single one
func (*Batcher) OnMessage ¶
OnMessage is called when a new message is receive. Add the new message to a batch
Click to show internal directories.
Click to hide internal directories.