示例#1
0
func (b *bulkWorker) publish() {
	b.output.send(message{
		signal: outputs.NewCompositeSignaler(b.pending...),
		events: b.events,
	})

	b.pending = nil
	b.events = make([]common.MapStr, 0, b.maxBatchSize)
}
示例#2
0
func (b *bulkWorker) publish() {
	// TODO: remember/merge and forward context options to output worker
	b.output.send(message{
		context: context{
			signal: outputs.NewCompositeSignaler(b.pending...),
		},
		events: b.events,
	})

	b.pending = nil
	b.events = make([]common.MapStr, 0, b.maxBatchSize)
}