Versions in this module Expand all Collapse all v0 v0.1.3 Nov 18, 2024 v0.1.2 Nov 14, 2024 v0.1.1 Nov 11, 2024 v0.1.0 Nov 5, 2024 Changes in this version + const EventQueueSize + type Event struct + Data any + Timestamp time.Time + Type EventType + func NewEvent(eventType EventType, eventData any) Event + type EventBus struct + func NewEventBus(promRegistry prometheus.Registerer) *EventBus + func (e *EventBus) Publish(eventType EventType, evt Event) + func (e *EventBus) Subscribe(eventType EventType) (EventSubscriberId, <-chan Event) + func (e *EventBus) SubscribeFunc(eventType EventType, handlerFunc EventHandlerFunc) EventSubscriberId + func (e *EventBus) Unsubscribe(eventType EventType, subId EventSubscriberId) + type EventHandlerFunc func(Event) + type EventSubscriberId int + type EventType string