agent/eventstream/eventstream.go
func (eventStream *EventStream) broadcast(event interface{}) {
	eventStream.handlersLock.RLock()
	defer eventStream.handlersLock.RUnlock()

	seelog.Debugf("Event stream %s received events, broadcasting to listeners...", eventStream.name)

	for _, handlerFunc := range eventStream.handlers {
		go handlerFunc(event)
	}
}
func (eventStream *EventStream) broadcast(event interface{}) {
	eventStream.handlersLock.RLock()
	defer eventStream.handlersLock.RUnlock()

	seelog.Debugf("Event stream %s received events, broadcasting to listeners...", eventStream.name)

	for _, handlerFunc := range eventStream.handlers {
		go handlerFunc(event)
	}
}
func ( eventStream * EventStream ) broadcast ( event interface { } ) { eventStream . handlersLock . RLock ( ) defer eventStream . handlersLock . RUnlock ( ) seelog . Debugf ( " " , eventStream . name ) for _ , handlerFunc := range eventStream . handlers { go handlerFunc ( event ) } }
// broadcast calls all handler's handler function
broadcast calls all handler s handler function