Set Flush Interval on EventQueue

Signed-off-by: Chai Nadig <chaitanya.nadig@gmail.com>
This commit is contained in:
Chai Nadig 2020-05-14 00:02:20 -07:00
parent 2898eb8c0c
commit d804941a18

View file

@ -84,6 +84,7 @@ func NewEventQueue(c chan Events, flushThreshold int, flushInterval time.Duratio
eq := &EventQueue{ eq := &EventQueue{
C: c, C: c,
flushThreshold: flushThreshold, flushThreshold: flushThreshold,
flushInterval: flushInterval,
flushTicker: ticker, flushTicker: ticker,
q: make([]Event, 0, flushThreshold), q: make([]Event, 0, flushThreshold),
eventsFlushed: eventsFlushed, eventsFlushed: eventsFlushed,