Documentation ¶
Overview ¶
Package eventbus introduces a simple in-memory event bus, in real life scenario, this would need a proper implementation
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventBus ¶
type EventBus struct {
// contains filtered or unexported fields
}
func NewEventBus ¶
func (*EventBus) Subscribe ¶
func (e *EventBus) Subscribe(eventType string, handler EventHandler)
type EventHandler ¶
type EventHandler func(data interface{})
type NoOpPublisher ¶
type NoOpPublisher struct{}
func (*NoOpPublisher) Publish ¶
func (n *NoOpPublisher) Publish(eventType string, data interface{})
Click to show internal directories.
Click to hide internal directories.