Bloccs.Manifest.Supervision (bloccs v0.2.0)

Copy Markdown View Source

Supervision strategy declared at the network level.

Summary

Functions

Cast a supervision strategy string to its atom form. Returns {:ok, atom} or :error for an unknown value.

Types

strategy()

@type strategy() :: :one_for_one | :one_for_all | :rest_for_one

t()

@type t() :: %Bloccs.Manifest.Supervision{
  max_restarts: non_neg_integer(),
  max_seconds: pos_integer(),
  strategy: strategy()
}

Functions

cast_strategy(value)

@spec cast_strategy(String.t()) :: {:ok, strategy()} | :error

Cast a supervision strategy string to its atom form. Returns {:ok, atom} or :error for an unknown value.

cast_strategy!(value)

@spec cast_strategy!(String.t()) :: strategy()

valid_strategies()