Resolves workflow retry configuration into concrete runtime decisions.
This module turns declarative workflow retry definitions into explicit retry outcomes that a step executor can consume without needing to re-interpret the workflow contract on every failure.
Summary
Functions
Returns the configured retry backoff policy for a workflow step.
Returns the configured backoff delay in milliseconds for the next retry attempt after the given failed attempt number.
Returns the configured maximum attempt count for a workflow step.
Resolves the retry outcome after a failed attempt for the given workflow step.
Types
@type delay_ms() :: non_neg_integer()
@type resolution() :: {:retry, pos_integer(), delay_ms()} | {:exhausted, pos_integer()} | :no_retry
Functions
Returns the configured retry backoff policy for a workflow step.
@spec backoff_delay(module(), atom(), pos_integer()) :: delay_ms()
Returns the configured backoff delay in milliseconds for the next retry attempt after the given failed attempt number.
@spec max_attempts(module(), atom()) :: {:ok, pos_integer()} | :no_retry
Returns the configured maximum attempt count for a workflow step.
@spec resolve(module(), atom(), pos_integer()) :: resolution()
Resolves the retry outcome after a failed attempt for the given workflow step.