Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dispatcher ¶
type Dispatcher interface { interfaces.Module AddEventListener(eventType EventType, listener *EventListener) RemoveEventListener(eventType EventType, listener *EventListener) RemoveAllEventListener(eventType EventType) DispatchEvent(event *Event) }
func NewDispatcher ¶
func NewDispatcher(ctx context.Context) Dispatcher
type EventHandler ¶
type EventHandler func(event *Event)
type EventListener ¶
type EventListener struct {
Handler EventHandler
}
func NewEventListener ¶
func NewEventListener(handler EventHandler) *EventListener
Click to show internal directories.
Click to hide internal directories.