Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventDispatcher ¶
type EventDispatcher struct {
// contains filtered or unexported fields
}
func NewEventDispatcher ¶
func NewEventDispatcher(ctx context.Context) *EventDispatcher
NewEventDispatcher creates a new EventDispatcher with a dedicated goroutine for processing.
func (*EventDispatcher) Publish ¶
func (ed *EventDispatcher) Publish(subject string, data interface{})
Publish sends a message to all subscribers of the given subject.
func (*EventDispatcher) Subscribe ¶
func (ed *EventDispatcher) Subscribe(subject string) (<-chan Event, func())
Click to show internal directories.
Click to hide internal directories.