Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dispatch ¶
func Dispatch(event StoppableEvent)
Types ¶
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
func GetDispatcher ¶
func GetDispatcher() *Dispatcher
func NewDispatcher ¶
func NewDispatcher() *Dispatcher
func (*Dispatcher) Bind ¶
func (p *Dispatcher) Bind(eventName string, listeners ...Listener)
func (*Dispatcher) BindBatch ¶
func (p *Dispatcher) BindBatch(eventName string, listeners []Listener)
func (*Dispatcher) Dispatch ¶
func (p *Dispatcher) Dispatch(event StoppableEvent)
type DispatcherEvent ¶
type DispatcherEvent interface {
Dispatch(event *StoppableEvent)
}
type Event ¶
type Event struct {
// contains filtered or unexported fields
}
func (*Event) IsPropagationStopped ¶
type Listener ¶
type Listener interface {
Listen(event *StoppableEvent)
}
type StoppableEvent ¶
Click to show internal directories.
Click to hide internal directories.