Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct {
ID string `json:"id"`
Source string `json:"source"`
SpecVersion string `json:"specversion"`
Type string `json:"type"`
Data map[string]any `json:"data"`
Time time.Time `json:"time"`
}
Event represents a generic event
type EventBus ¶
type EventBus interface {
Publish(ctx context.Context, event Event) error
Subscribe(eventType string, handler func(ctx context.Context, event Event)) error
Close() error // Clean up resources
}
EventBus defines the interface for publishing and subscribing to events
var DefaultEventBus EventBus
Click to show internal directories.
Click to hide internal directories.