Skip to main content

Module ctx

Module ctx 

Expand description

The workflow context: what workflow code uses to make durable progress.

Code between ctx calls must be deterministic: it is re-run against the journal after a crash. Anything nondeterministic (calling services, the clock, randomness) goes through ctx so its result is recorded.

Structs§

ChildOptions
How a child workflow is started.
Completion
What Ctx::await_completion’s send gets: the token that completes this attempt, and the URL that does it over HTTP when the engine serves its API (POST the value as JSON to url; …/v1/fail/<token> fails it).
Ctx
The context handed to workflow code.
Handlers
Query and update handlers a run’s code registered.
RetryPolicy
How a failing step is retried. Attempts include the first one.
StepOptions
WaitOptions
How a signal is waited for.
WorkflowLog
Ctx::log: a workflow’s log.

Enums§

Exhausted
What a step does when its retries run out on a failure that could be retried: its attempts, or max_elapsed, are used up.

Type Aliases§

QueryFn
RetryIf
Decides whether a failure may be retried, given the attempt that failed.
UpdateFn
ValidateFn