Documentation ¶
Index ¶
- func NewManager() interfaces.EventManager
- type Manager
- func (e *Manager) Emit(eventName string, optionalData ...interface{})
- func (e *Manager) On(eventName string, callback func(...interface{}))
- func (e *Manager) OnMultiple(eventName string, callback func(...interface{}), counter uint)
- func (e *Manager) Once(eventName string, callback func(...interface{}))
- func (e *Manager) PushEvent(eventData *messages.EventData)
- func (e *Manager) Shutdown()
- func (e *Manager) Start(renderer interfaces.Renderer)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewManager ¶
func NewManager() interfaces.EventManager
NewManager creates a new event manager with a 100 event buffer
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles and processes events
func (*Manager) OnMultiple ¶
OnMultiple adds a listener for the given event that will trigger at most <counter> times.
func (*Manager) Once ¶
Once adds a listener for the given event that will auto remove after one callback
func (*Manager) Shutdown ¶
func (e *Manager) Shutdown()
Shutdown is called when exiting the Application
func (*Manager) Start ¶
func (e *Manager) Start(renderer interfaces.Renderer)
Start the event manager's queue processing
Click to show internal directories.
Click to hide internal directories.