Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
Dispatcher (a.k.a event emitter, dispatcher) stores listener and notifies them when an event emitted
func (Dispatcher) Emit ¶
func (o Dispatcher) Emit(eventName string, data interface{}) error
Emit notifies listeners about the event
func (Dispatcher) On ¶
func (o Dispatcher) On(event string, listener Listener)
On adds new listener. listener is a callback function that will be called when event emits
Click to show internal directories.
Click to hide internal directories.