Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventHandler ¶
Implement same logic as in the net/http std lib
type EventHandlerFunc ¶
func (EventHandlerFunc) HandleEvent ¶
func (f EventHandlerFunc) HandleEvent(db database.Database, e Event)
type EventRegistry ¶
type EventRegistry interface { RegisterEventHandler(EventName, EventHandler) PushEvent(Event) Run(ctx context.Context) }
EventRegistry is the central point for managing handlers for all kind of events
func NewEventRegistry ¶
func NewEventRegistry(db database.Database) EventRegistry
NewEventRegistry returns an event registry where for each incoming event a list of handlers is called. We use a buffered channel for the worker go routines.
Click to show internal directories.
Click to hide internal directories.