event

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dispatcher

type Dispatcher struct {
	// contains filtered or unexported fields
}

Dispatcher handles event publishing and subscription

func NewEventDispatcher

func NewEventDispatcher() *Dispatcher

NewEventDispatcher creates a new event dispatcher

func (*Dispatcher) GetMetrics

func (d *Dispatcher) GetMetrics() map[string]any

GetMetrics returns metrics

func (*Dispatcher) Publish

func (d *Dispatcher) Publish(eventName string, data any)

Publish sends event to all subscribers

func (*Dispatcher) PublishWithRetry

func (d *Dispatcher) PublishWithRetry(eventName string, data any, maxRetries int)

PublishWithRetry publishes event with retry

func (*Dispatcher) Subscribe

func (d *Dispatcher) Subscribe(eventName string, handler func(any))

Subscribe adds a handler for specific event

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL