Skip to main content

Module ingress

Module ingress 

Source
Expand description

Bounded ingress queue with deterministic ordering and TTL evaluation.

IngressQueue buffers commands between submission and tick execution. It enforces capacity limits, assigns monotonic arrival sequence numbers, evaluates TTL expiry, and sorts commands into a deterministic order for processing by the tick engine.

§Ordering

Commands are sorted by the composite key: (priority_class, source_id|MAX, source_seq|MAX, arrival_seq)

This ensures:

  • Lower priority class values execute first (0 = system, 1 = user).
  • Within a priority class, source-keyed commands sort before anonymous ones.
  • Source-keyed commands from the same source execute in sequence order.
  • Anonymous commands execute in arrival order.

Structs§

DrainResult
Result of draining the queue at the start of a tick.
DrainedCommand
A command paired with its original batch-local index from submit().
IngressQueue
Bounded command queue for the ingress pipeline.