pub enum EngineStep {
Show 17 variants
OpCompleted {
op_ref: OpRef,
exec_id: ExecId,
sites_written: Vec<NodeSiteId>,
},
AsyncSuspended {
op_ref: OpRef,
exec_id: ExecId,
cmd_id: CommandId,
},
SendEnvelope(WireEnvelope),
AppEvent {
module_name: String,
topic: String,
value_bytes: Vec<u8>,
},
LifecycleFired {
phase: String,
},
BootstrapComplete,
WaitingOnBootstrap,
OpFailed {
op_ref: OpRef,
exec_id: ExecId,
error: OpError,
},
CycleBudgetExceeded {
ops_invoked: usize,
},
OutboundDropped {
count: usize,
},
WireDecodeFailed {
hash: u64,
payload_size: usize,
detail: String,
},
WireReceiveFailed {
src_peer: Option<PeerId>,
fill_index: u32,
actual_hash: u64,
payload_size: usize,
kind: WireReceiveErrorKind,
},
WireTimeout {
wire_req_id: u64,
target_site: NodeSiteId,
started_at_ns: u64,
parked_op: Option<CommandId>,
},
PeerBlocked {
peer: PeerId,
reason: BlockReason,
},
PeerDown {
peer: PeerId,
},
PeerUp {
peer: PeerId,
},
PeerResolveFailed {
peer: Option<PeerId>,
op_ref: OpRef,
exec_id: ExecId,
},
}Expand description
One step of work the engine performed during a poll cycle.
Engine::poll returns Vec<EngineStep> capturing every event
the host can observe.
Variants§
OpCompleted
An Op completed successfully + wrote sites_written slots.
Fields
sites_written: Vec<NodeSiteId>Output sites the Op wrote.
AsyncSuspended
An Op suspended on a CommandId awaiting completion.
Fields
SendEnvelope(WireEnvelope)
An outbound envelope is ready to ship.
AppEvent
An app-facing event was published. Carries the topic name
(the function.output value name, or the AppEmit topic for
mid-cycle emissions) plus the serialized value bytes. When the
emitter is a Notify-style call with no payload, value_bytes
is empty.
Fields
LifecycleFired
A lifecycle phase fired. fills in the per-phase payload.
BootstrapComplete
The single bootstrap FunctionCall the engine seeded at install completion drained to quiescence. Body ops fire on the same poll cycle once this step is emitted. Bootstrap is a one-shot per Node lifetime; a restored Node does not re-emit (its bootstrap pass already ran pre-snapshot).
WaitingOnBootstrap
At least one bootstrap-phase op returned DispatchResult::Async
and the engine is waiting on its completion before activating
body ops. The host drives the completion via the ingress and
re-invokes Node::run_bootstrap.
OpFailed
An Op failed. The error is also published on the bus as
InfraEvent::OpFailure.
Fields
CycleBudgetExceeded
cycle_op_budget was hit during a poll(). The engine
yielded mid-cascade; the host should poll again to drain
the remaining frontier. Emitted at most once per poll.
Fields
OutboundDropped
max_outbound_queue was hit since the previous poll;
count envelopes were FIFO-dropped to make room. Emitted
at most once per poll.
WireDecodeFailed
An inbound wire envelope’s payload could not be decoded.
The envelope’s slot fill was dropped; this step lets the
host observe the drop. Carries the same context as the
matching InfraEvent::WireDecodeFailure on the bus.
Fields
WireReceiveFailed
An inbound wire fill failed the typed-decode step. Mirrors
the bus’s crate::bus::InfraEvent::WireReceiveError so
the host poll() caller observes the per-fill failure
without subscribing to the bus. Other fills in the same
envelope still deliver (partial-delivery semantics).
Fields
kind: WireReceiveErrorKindWhich failure mode fired.
WireTimeout
A registered in-flight request entry was evicted by the
engine’s per-poll RequestTracker::drain_stale sweep because
its per-entry TTL elapsed without a matching response. The
originator’s local DAG continuation parked behind
parked_op (if Some) is failed with “chain timeout” via
the same path async-suspension completions take.
Fields
target_site: NodeSiteIdDestination site the request was dispatched to.
PeerBlocked
An inbound envelope from peer was dropped by the
crate::framework::PeerGovernor before any slot was
written. path -
the “first contact with IP” check the user flagged.
Fields
reason: BlockReasonWhy the envelope was rejected.
PeerDown
A peer crossed below the failure threshold and is now marked down. Emitted at most once per transition.
PeerUp
A peer recovered after a failure streak.
PeerResolveFailed
wire::Send could not resolve its destination peer’s
addresses against the framework’s
crate::framework::AddressBook. Either the peer is
unknown, its address list is empty, or the Send op’s peer
input didn’t carry a valid PeerId. The Send op produces
no envelope; the host application reacts via this event.
Mirrors InfraEvent::PeerResolveFailure on the bus -
telemetry-tap parity with the /// PeerBlocked/PeerDown/PeerUp family.
Trait Implementations§
Source§impl Clone for EngineStep
impl Clone for EngineStep
Source§fn clone(&self) -> EngineStep
fn clone(&self) -> EngineStep
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more