Skip to main content

Module bus

Module bus 

Source
Expand description

Typed in-Node event bus. Typed in-Node event bus. Cross-Component signaling per docs/ENGINE.md §13.1.

Components publish events via the bus; the engine’s bus-event routing pass delivers them to subscribed Components.

Structs§

OpError
Op invocation failure detail. Surfaced by the engine when dispatch_atomic returns Err or the dispatch table lookup misses. Three-field shape: kind is a stable categorical label, reason is a &'static str (e.g. "blocklisted", "cooldown") callers can match on, detail is a free-form human-readable description.
TypedBus
Typed in-Node event bus. Carries published events from one poll cycle to the next; the engine’s bus-routing pass drains the queue and routes to subscribed NodeSiteIds.

Enums§

AllocFailReason
Why a fallible-allocation boundary refused to admit bytes into engine state. Carried by WireReceiveErrorKind::AllocationFailed and AppIngressErrorKind::AllocationFailed.
AppEvent
App-Op-emitted events surfaced as EngineStep::AppEvent.
AppEventError
Reasons an AppEvent::emit / AppEvent::notify construction can fail.
AppIngressErrorKind
Sub-kind discriminator for InfraEvent::AppIngressError. One top-level variant + sub-kind keeps the bus-topic count down - subscribers route on the variant name and match the sub-kind out of the event’s fields when they need to distinguish allocation failure from budget exhaustion from a per-item cap.
AppIngressSource
Application-side entry point that raised an InfraEvent::AppIngressError. Carries the identity the host referenced when the failure occurred so subscribers can correlate the bus event with the original push call.
InfraEvent
Framework-emitted infrastructure events per docs/ENGINE.md §13.1.
NodeEvent
All events that may flow through the in-Node bus.
OpErrorKind
Op invocation failure kind. a stable categorical label consumers match on for retry / report / drop policy decisions without parsing the freeform OpError::detail.
WireReceiveErrorKind
Sub-kind discriminator for InfraEvent::WireReceiveError. One top-level variant + an enum sub-kind keeps the bus-topic count down and lets subscribers route on the variant while matching the sub-kind out of the variant fields - the PeerSuspect/PeerDown/PeerLive triple pattern is for distinct lifecycle events; these three share lifecycle (one fill, one decode step) and audience (wire-payload integrity).