Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pool ¶
type Pool struct { Size int EventsChannel <-chan collection.CollectRequest // contains filtered or unexported fields }
Pool spawn goroutine as much as Size that will listen to EventsChannel. On Close, wait for all data in EventsChannel to be processed.
func CreateWorkerPool ¶
func CreateWorkerPool(size int, eventsChannel <-chan collection.CollectRequest, deliveryChannelSize int, kafkaProducer publisher.KafkaProducer) *Pool
CreateWorkerPool create new Pool struct given size and EventsChannel worker.
func (*Pool) FlushWithTimeOut ¶
FlushWithTimeOut waits for the workers to complete the pending the messages to be flushed to the publisher within a timeout. Returns true if waiting timed out, meaning not all the events could be processed before this timeout.
func (*Pool) StartWorkers ¶
func (w *Pool) StartWorkers()
StartWorkers initialize worker pool as much as Pool.Size
Click to show internal directories.
Click to hide internal directories.