pub enum IngressEvent {
EnvelopeFrom {
src_peer: PeerId,
envelope: WireEnvelope,
src_observed_address: Option<Address>,
},
AppEvent {
module_name: String,
input_name: String,
value_bytes: Vec<u8>,
},
TimerMatured {
at_ns: u64,
},
Invoke {
module_name: String,
inputs: Vec<(String, Vec<u8>)>,
exec_id: ExecId,
},
Completion {
cmd_id: CommandId,
results: Vec<Vec<u8>>,
},
CompletionFailed {
cmd_id: CommandId,
detail: String,
},
SendFailed {
wire_req_id: u64,
peer: Vec<u8>,
reason: &'static str,
},
AppIngressError {
source: AppIngressSource,
byte_count: usize,
kind: AppIngressErrorKind,
},
}Expand description
External-event variants pushed to the ingress queue per
docs/ENGINE.md §6 entry points.
Variants§
EnvelopeFrom
Inbound wire envelope from the transport layer, attributed
to a source peer. The engine calls
PeerGovernor::check_inbound(src_peer) on ingress; blocked or
non-allowlisted peers are dropped before any slot is written,
surfacing as EngineStep::PeerBlocked.
Fields
envelope: WireEnvelopeThe envelope payload.
src_observed_address: Option<Address>Transport-observed source address, when the adapter can
supply it (e.g. NAT-translated remote endpoint, dialer’s
observed multiaddr). The receiver merges this into its
AddressBook entry for src_peer so reflexive-address
discovery composes with the sender-claimed
envelope.src_peer_addresses list. None means the
transport didn’t surface an observed address.
AppEvent
Host pushed an app event onto a Module input.
Fields
TimerMatured
External timer maturity signal (used when an off-thread scheduler drives the engine).
Invoke
Explicit Module invocation from host.
Fields
Completion
External (off-thread) async completion landing back at the engine.
Fields
CompletionFailed
Async completion FAILURE landing back at the engine.
Distinct from Completion: CompletionSink::fail mints
this variant directly so handle_completion_failed can
route to the typed OpFailed surface — the host sees a
real error, not a success-bytes masquerade.
Fields
SendFailed
Transport-side send-outcome failure surfaced
by an adapter (libp2p, sim, etc.) when the network NAKed an
outbound envelope or its delivery deadline elapsed without
an ACK. Distinct from CompletionFailed (which covers
off-thread compute completion); this variant covers
transport-layer delivery failure.
Fields
AppIngressError
Off-thread application-ingress failure (currently only
CompletionSink::complete exceeding the per-completion result
cap). The engine drains this variant and publishes a matching
InfraEvent::AppIngressError on the bus so subscribers see the
rejection. The synchronous Node::deliver_event / Node::invoke
path publishes directly with &mut bus access; this variant is
the cross-thread bridge for sinks that don’t hold a bus
reference. The Component observes an async-op timeout in place
of the dropped completion.
Fields
source: AppIngressSourceWhich application-side entry point raised the failure.
kind: AppIngressErrorKindWhich failure mode fired.
Implementations§
Source§impl IngressEvent
impl IngressEvent
Sourcepub fn from_in_process(src_peer: PeerId, envelope: WireEnvelope) -> Self
pub fn from_in_process(src_peer: PeerId, envelope: WireEnvelope) -> Self
Construct an EnvelopeFrom for the in-process router common
case where the transport carries no NAT and the observed
address is the sender’s PeerId-tagged multiaddr. Test buses
and the in-process router call this so observed-address
propagation exercises the same merge path as a real
transport’s reflexive surface.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IngressEvent
impl RefUnwindSafe for IngressEvent
impl Send for IngressEvent
impl Sync for IngressEvent
impl Unpin for IngressEvent
impl UnsafeUnpin for IngressEvent
impl UnwindSafe for IngressEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedComponent for T
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request