Jidoka.Workflow.RetryPolicy (Jidoka v0.9.0)

Copy Markdown View Source

Data contract for local workflow step retry policy.

Summary

Functions

Returns the supported retry backoff types.

Parses retry policy attributes.

Parses retry policy attributes or raises.

Returns the Zoi schema for workflow retry policies.

Types

t()

@type t() :: %Jidoka.Workflow.RetryPolicy{
  backoff: %{max: integer(), min: integer(), type: :fixed | :exponential},
  max_attempts: integer()
}

Functions

backoff_types()

@spec backoff_types() :: [atom()]

Returns the supported retry backoff types.

new(attrs)

@spec new(keyword() | map() | nil) :: {:ok, t() | nil} | {:error, term()}

Parses retry policy attributes.

new!(attrs)

@spec new!(keyword() | map() | nil) :: t() | nil

Parses retry policy attributes or raises.

schema()

@spec schema() :: Zoi.schema()

Returns the Zoi schema for workflow retry policies.