Documentation
¶
Overview ¶
Package dispatcher handles bout events.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dispatcher ¶
type Dispatcher interface { Dispatch(event *Event) error DispatcherType() enum.DispatcherTypeID DispatchTypes() []enum.EventTypeID }
type Event ¶
type Event struct { Type enum.EventTypeID Object interface{} }
func NewEvent ¶
func NewEvent(typ enum.EventTypeID, object interface{}) *Event
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) Dispatcher ¶
func (m *Manager) Dispatcher(typ enum.DispatcherTypeID) (Dispatcher, bool)
func (*Manager) Register ¶
func (m *Manager) Register(ds ...Dispatcher)
func (*Manager) RegisterFunc ¶
func (m *Manager) RegisterFunc(typ enum.EventTypeID, d Dispatcher)
Click to show internal directories.
Click to hide internal directories.