Skip to main content

Module ingress

Module ingress 

Source
Expand description

Lock-free MPMC ingress queue. Lock-free MPMC ingress queue.

External tasks (transport, host invocations, off-thread completions) push IngressEvents onto the queue; the engine drains them on its next poll. Lock-free via concurrent-queue v2; the engine sleeps on an AtomicWaker until a producer wakes it.

Arc<IngressQueue> is shared between the engine and any number of external producer tasks running on different threads.

Per ENGINE.md §2.2 + §16: the queue is BOUNDED with default capacity bus_capacity * 4 (= 4096 when bus_capacity uses the spec default of 1024). On overflow, push returns Err(IngressEvent) so the transport adapter can choose to retry, drop with a metric, or escalate as back-pressure to its upstream. The dropped_overflow counter tracks total overflow drops surfaced via dropped_overflow().

Structs§

IngressQueue
Lock-free MPMC ingress queue + waker. Multiple external producers may push concurrently; the engine’s single consumer drains via drain_all on each poll cycle.
IngressQueueRef
Cheap-clone handle to the shared IngressQueue surfaced by crate::node::Node::ingress_handle. Behaves identically to Arc<IngressQueue> via Deref so callers can .push(IngressEvent::...) directly. The newtype wrapper isolates the public API from the underlying smart-pointer choice.

Enums§

IngressEvent
External-event variants pushed to the ingress queue per docs/ENGINE.md §6 entry points.

Constants§

COMPLETION_DETAIL_CAP
Per-fail() detail-string hard cap. Truncated rather than rejected so the host’s Display-rendered failure message always lands, even when oversized.
DEFAULT_INGRESS_CAPACITY
Default ingress capacity: bus_capacity * 4 per ENGINE.md §2.2.