Skip to main content

Module worker

Module worker 

Source
Expand description

Per-session actor for the SessionPixSupervisor.

The worker serializes lifecycle events through the deterministic core, manages the deadline timer, applies safety-critical gate actions locally, and forwards actions to an external I/O driver.

Runtime-agnostic: uses crossfire channels and the runtime prelude from hopr_utils so no direct tokio dependency (tests use tokio freely).

StructsΒ§

SessionPixSupervisorHandle
Cloneable handle to a running SessionPixWorker.

EnumsΒ§

WorkerCommand

FunctionsΒ§

dispatch πŸ”’
Apply gate control, forward actions, then report whether the worker should keep running.
is_coalescible πŸ”’
Returns true for actions that are safe to drop when the action channel is transiently full.
process_cmd πŸ”’
Handle a received command from the handle.
publish_telemetry πŸ”’
Publishes this Session’s share of the node-level PIX aggregates.
report_fill_stall πŸ”’
Counts a fill stall, if one just began.
send_actions πŸ”’
Non-blocking forward of actions to the driver.
spawn_supervisor_worker
Spawn a supervisor worker and return its handle and action driver receiver.
worker_loop πŸ”’

Type AliasesΒ§

ActionChannel πŸ”’
ActionRx
ActionTx
CmdChannel πŸ”’
CmdRx πŸ”’
CmdTx πŸ”’