Module saga

Module saga 

Source

Re-exports§

pub use log::LauncherSagaLog;
pub use recovery::compensate_unresolved_launcher_sagas;

Modules§

log 🔒
pool_respawn
recovery 🔒
window_cleanup

Structs§

ApplyOutcome 🔒
LSD-2 — outcome of apply_action. Combines the prior bool (is the saga still in flight?) with the new awaiting_step book- keeping the coordinator needs to call LauncherSagaLog::finish_step when the awaited bus event lands.
InFlightSaga 🔒
Saga coordinator task.
SagaCoordinator
SagaCtx
Read-only context passed to saga callbacks. Currently carries only the saga_id; kept as a struct (rather than a bare u64) so future fields can be added without touching every Saga impl.

Enums§

PipeTarget
Where a SagaAction::IssueCmd should be dispatched.
SagaAction
What a saga decides to do next, returned from start / on_event. The coordinator drives the saga forward by reacting to this enum.

Traits§

Saga
A multi-step, multi-reducer state machine. Implementations describe one logical operation (tear-off, pool-respawn, etc.).

Functions§

derive_step_name 🔒
LSD-2 — short, greppable name for a Command dispatched as part of a saga step. Mirrors srv’s command_discriminant_name in spirit (snake_case strings rather than Debug formatting) but prefixes with issue_cmd_<target>_<discriminant> so --diag sagas output makes the dispatch target obvious without a separate column lookup.
inject_saga_id 🔒
CPD-3 — fill in the saga_id field on a host-bound Command before dispatch. Sagas construct their IssueCmd actions with a placeholder saga_id: 0 (they don’t know their coordinator- allocated id at action-construction time); the coordinator rewrites the field at dispatch time so the host can echo it back on the matching Report*.
match_trigger 🔒
Inspect a bus event for “should this start a fresh saga?” Returns the constructed saga (boxed) on a hit; None otherwise.
run_coordinator
Run the coordinator’s bus-subscription loop.