EventEmitter represents the event emitter.
type EventEmitter struct { sync.RWMutex // contains filtered or unexported fields }
func New(name string) *EventEmitter
New creates a new event emitter
func (emitter *EventEmitter) Emit(eventName string, params interface{})
Emit triggers an event and invokes the callbacks
func (emitter *EventEmitter) On(eventName string, callback func(interface{}))
On assigns a callback to an event
func (emitter *EventEmitter) Remove(eventName string, callback func(interface{})) bool
Remove deletes a callback assigned to the given event.
[IMPORTANT] The callback passed is the callback to be removed.