Continuum.Runtime.SignalRouter (continuum v0.5.0)

Copy Markdown View Source

Routes external signals and child-completion wakeups to workflow processes.

With the Postgres journal, signals are durable: delivery inserts a row into continuum_signals, emits pg_notify('continuum_signal', run_id), and wakes a local engine when one is registered. The engine consumes the mailbox row into a journaled signal_received event during replay.

This process also listens on continuum_run_wake — emitted when a child run reaches a terminal state — and wakes the parent's local engine so an awaiting parent resumes promptly. No separate listener process: a parent wakeup routes through the same "find local pid in Registry, wake it, else rely on the Dispatcher poll" path as a signal.

Summary

Functions

Returns a specification to start this module under a supervisor.

Deliver a signal to a run.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

deliver(run_id, name, payload)

@spec deliver(binary(), atom(), term()) :: :ok | {:error, term()}

Deliver a signal to a run.

deliver(run_id, name, payload, opts)

@spec deliver(binary(), atom(), term(), keyword()) :: :ok | {:error, term()}

start_link(opts \\ [])