AshCircuitBreaker (ash_circuit_breaker v0.1.0)
An extension for Ash.Resource which adds the ability to wrap actions in circuit breakers to allow for graceful handling of and recovery from failures.
Summary
Functions
Generates a name for the circuit breaker based on the action input or changeset.
Types
@type namefun() :: (Ash.Changeset.t() | Ash.ActionInput.t() -> atom()) | (Ash.Changeset.t() | Ash.ActionInput.t(), map() -> atom())
@type t() :: %AshCircuitBreaker{ __identifier__: any(), action: atom(), limit: pos_integer(), name: atom() | namefun(), per: pos_integer(), reset_after: pos_integer(), should_break?: error_matcher() | nil }