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 is used to dispatch events to listeners
func NewDispatcher ¶
func NewDispatcher(log *zap.Logger) *Dispatcher
NewDispatcher returns a new dispatcher instance
func (*Dispatcher) Register ¶
func (d *Dispatcher) Register(listener ...EventListener)
Register events listeners
type Event ¶
type Event interface {
Name() EventName
}
Event is a event that can be dispatched and 0 .. n listeners may listen for
type EventListener ¶
EventListener enables to listen for a certain event
Click to show internal directories.
Click to hide internal directories.