Expand description
NetworkEventBus — synchronous publish-subscribe event bus for network events.
Provides topic-based routing, subscriber filtering, and event replay for late subscribers. All operations are synchronous and suitable for use from both synchronous and asynchronous contexts without spawning tasks.
§Design
- Publishers call
NetworkEventBus::publishto emit events. - Consumers call
NetworkEventBus::subscribeto register interest in events. - Subscribers may specify an
EventFilterto narrow the event stream. - A configurable replay buffer retains recent events so that late subscribers
can catch up via
NetworkEventBus::replay_for_subscriber. - No
unwrap()is used anywhere in this module.
Structs§
- Event
BusConfig - Configuration knobs for
NetworkEventBus. - Event
BusStats - A snapshot of bus-wide statistics.
- NebNetwork
Event - A single network event, as published to the bus.
- NebSubscription
- Runtime state for a single subscriber.
- Network
Event Bus - Synchronous, in-process publish-subscribe bus for network events.
- Subscriber
Id - An opaque, monotonically increasing identifier for a subscription.
Enums§
- BusError
- Errors returned by
NetworkEventBusoperations. - Event
Filter - Determines which events are delivered to a particular subscriber.
- Event
Topic - Categorises the kind of network event being published.