Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultRecovery = func(err interface{}, event Event, data interface{}) { log.Errorf("[Event] handler panic event: %s, data: %v, err: %v", event, data, err) }
Functions ¶
This section is empty.
Types ¶
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
func NewDispatcher ¶
func NewDispatcher(opts ...Option) *Dispatcher
func (*Dispatcher) AddListener ¶
func (d *Dispatcher) AddListener(listener ...Listener)
func (*Dispatcher) Dispatch ¶
func (d *Dispatcher) Dispatch(event Event, data interface{})
Click to show internal directories.
Click to hide internal directories.