Skip to main content

Crate solti_chain

Crate solti_chain 

Source
Expand description

Conditional composite workload runner for Solti Tasks.

A chain selects exactly one current step. Each step can choose one next step after success and one after failure. ChainSpec::validate requires every declared step to be reachable from entry and rejects cycles. The model is an outcome-directed acyclic chain rather than a parallel DAG scheduler.

The chain is carried through solti_model::TaskWorkload::Extension with CHAIN_API_VERSION and CHAIN_KIND. ChainRunner builds every nested workload through a snapshotted solti_runner::RunnerCatalog and returns one outer taskvisor::TaskRef.

Taskvisor therefore applies timeout, restart, backoff, admission, cancellation, status, and history to the whole chain attempt.

Register leaf runners first, snapshot them into the chain runner, and then register the chain runner. register_chain_runner performs the last two operations for the common case.

Structs§

ChainRunner
Runner that composes registered leaf workloads into one conditional chain.
ChainSpec
Validated desired state of a chain extension workload.
ChainStep
One executable step in a ChainSpec.
FailureTransition
Transition selected when a step fails.

Enums§

ChainError
Error returned while constructing, validating, or decoding a chain.
FailureMode
Failure-state behavior after following an onFailure transition.

Constants§

CHAIN_API_VERSION
API group and version of the chain extension workload.
CHAIN_KIND
Kind of the chain extension workload.

Functions§

is_chain_workload
Returns whether workload is the chain extension GVK owned by this crate.
register_chain_runner
Registers a chain runner after snapshotting every runner already registered.

Type Aliases§

ChainResult
Convenience result type for chain model operations.