agent/eventstream/eventstream.go
func (eventStream *EventStream) WriteToEventStream(event interface{}) error {
	eventStream.statusLock.RLock()
	defer eventStream.statusLock.RUnlock()

	if !eventStream.open {
		return fmt.Errorf("Event stream is closed")
	}
	eventStream.event <- event
	return nil
}
func (eventStream *EventStream) WriteToEventStream(event interface{}) error {
	eventStream.statusLock.RLock()
	defer eventStream.statusLock.RUnlock()

	if !eventStream.open {
		return fmt.Errorf("Event stream is closed")
	}
	eventStream.event <- event
	return nil
}
// WriteToEventStream writes event to the event stream