code: func (eq *eventQueue) run() {
  	for {
  		block := eq.next()
  
  		if block == nil {
  			return // nil block means event queue is closed.
  		}
  
  		if err := eq.sink.Write(block...); err != nil {
  			logrus.Warnf("eventqueue: error writing events to %v, these events will be lost: %v", eq.sink, err)
  		}
  
  		for _, listener := range eq.listeners {
  			listener.egress(block...)
  		}
  	}
  }
docs: // run is the main goroutine to flush events to the target sink.