Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dispatcher ¶ added in v0.1.4
type Dispatcher struct {
// contains filtered or unexported fields
}
Dispatcher handles event publishing and subscription
func NewEventDispatcher ¶ added in v0.1.4
func NewEventDispatcher() *Dispatcher
NewEventDispatcher creates a new event dispatcher
func (*Dispatcher) GetMetrics ¶ added in v0.1.4
func (d *Dispatcher) GetMetrics() map[string]any
GetMetrics returns comprehensive metrics
func (*Dispatcher) Publish ¶ added in v0.1.4
func (d *Dispatcher) Publish(eventName string, data any)
Publish sends event to all subscribers
func (*Dispatcher) PublishWithRetry ¶ added in v0.1.4
func (d *Dispatcher) PublishWithRetry(eventName string, data any, maxRetries int)
PublishWithRetry publishes event with retry
func (*Dispatcher) Subscribe ¶ added in v0.1.4
func (d *Dispatcher) Subscribe(eventName string, handler func(any))
Subscribe adds a handler for specific event
Click to show internal directories.
Click to hide internal directories.