Module dispatch
Expand description
Unified SOP event dispatch helpers.
Structs§
- SopCron
Cache - Pre-parsed cron schedules for SOP triggers. Built once at daemon startup to avoid re-parsing cron expressions on every scheduler tick.
- SopIngress
- Borrowed, per-call adapter from transport deliveries into canonical SOP events.
Enums§
- Dispatch
Result - Outcome of attempting to dispatch an event to the SOP engine.
- SopIngress
Kind - How a
SopTriggerSourcevariant currently reaches the SOP matcher. - SopIngress
Outcome - Result of passing one external delivery through
SopIngress. - SopIngress
Unavailable - Why a fan-in event could not enter the shared SOP dispatch path.
Functions§
- check_
sop_ cron_ triggers - Check all cached cron SOP triggers for firings in the window
(last_check, now]and dispatch events for each. Uses window-based evaluation so ticks between polls are never missed. - dispatch_
peripheral_ signal - Convenience wrapper for peripheral hardware callbacks.
Builds a
SopEventwith sourcePeripheraland topic"{board}/{signal}"then dispatches it through the standard path. - dispatch_
sop_ event - dispatch_
sop_ event_ to - Dispatch an incoming event to one named SOP, after normal trigger matching. This is useful for channel routers that already selected a configured SOP name, while still requiring that SOP to declare a matching trigger.
- dispatch_
untrusted_ fan_ in - Compatibility wrapper for fan-in sources that already require concrete
engine and audit handles. New or handle-optional sources should use
SopIngressso missing handles and source-interest gating share one path. - ingress_
kind - Classify every
SopTriggerSourceasSopIngressKind::SharedIngress,SopIngressKind::DedicatedInternalDispatch, orSopIngressKind::NotYetLive. - process_
headless_ results - results_
need_ redelivery - True when at least one matched SOP is backpressured and no SOP has already
started from this delivery. A durable transport (e.g. AMQP with
durable_ack) can safely nack/requeue only when redelivery cannot replay a started SOP’s side effects.