Skip to main content

Module event_bus

Module event_bus 

Source
Expand description

Event bus for publishing and subscribing to system-wide PunchEvents.

Built on top of tokio::sync::broadcast so that multiple subscribers can independently receive every event without blocking the publisher. Maintains an in-memory history ring buffer so that the dashboard audit trail can display recent events even if no WebSocket client was connected at the time.

Structs§

EventBus
A broadcast-based event bus for the Punch system.
FilteredReceiver
A receiver that applies a user-supplied predicate to incoming events.