Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Batcher ¶
type Batcher struct {
// contains filtered or unexported fields
}
Batcher builds lists of records for dispatch
func NewBatcher ¶
func NewBatcher(capacity int, duration time.Duration, dispatchFunc DispatchFunc) *Batcher
NewBatcher configure a new batcher and it's dipsatch function
func (*Batcher) Handler ¶
func (b *Batcher) Handler(channel syslog.LogPartsChannel)
Handler handle incoming log messages and write batches to the dispatcher function
type DispatchFunc ¶
type DispatchFunc func([]*LogEntry)
DispatchFunc invoked when a batch is ready to send
Click to show internal directories.
Click to hide internal directories.