DynamicSupervisor managing per-environment circuit breakers.
Starts a CircuitBreaker process for each Plaid environment
on demand. Circuit breakers are never restarted automatically
(:temporary) because their state would reset on restart anyway.
Summary
Functions
Returns a specification to start this module under a supervisor.
Ensures a circuit breaker exists for the given environment. Safe to call multiple times — idempotent.
Functions
@spec check(atom(), PlaidEx.Config.t()) :: :ok | {:error, :circuit_open}
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec ensure_started(atom(), PlaidEx.Config.t()) :: {:ok, pid()} | {:error, term()}
Ensures a circuit breaker exists for the given environment. Safe to call multiple times — idempotent.
@spec record_failure(atom(), PlaidEx.Error.t(), PlaidEx.Config.t()) :: :ok
@spec record_success(atom()) :: :ok
@spec start_link(keyword()) :: Supervisor.on_start()