ETS-based registry for circuit breaker state.
Summary
Functions
Execute a function through a named circuit breaker using the default registry with default options.
Execute a function through a named circuit breaker.
Return the default registry (anonymous ETS table).
Delete a circuit breaker from the registry.
List all circuit breakers and their states.
Create a new registry. Use name: :my_table for a named ETS table.
Reset a circuit breaker to closed state.
Get the current state of a circuit breaker.
Types
Functions
Execute a function through a named circuit breaker using the default registry with default options.
@spec call(registry(), String.t(), (-> result), keyword()) :: result | {:error, :circuit_open} when result: term()
Execute a function through a named circuit breaker.
@spec default_registry() :: registry()
Return the default registry (anonymous ETS table).
Delete a circuit breaker from the registry.
@spec list(registry()) :: [{String.t(), Foundation.CircuitBreaker.state()}]
List all circuit breakers and their states.
Create a new registry. Use name: :my_table for a named ETS table.
Reset a circuit breaker to closed state.
@spec state(registry(), String.t()) :: Foundation.CircuitBreaker.state()
Get the current state of a circuit breaker.