GenServer-backed deployment circuit breaker for routing skips, half-open probes, and cooldowns.
Summary
Functions
Returns a specification to start this module under a supervisor.
Types
@type state() :: :closed | :open | :half_open
@type t() :: %LLMProxy.Providers.CircuitBreaker{ cooldown_ms: non_neg_integer() | nil, failures: non_neg_integer(), opened_at: integer() | nil, state: state() }
Functions
@spec available?(LLMProxy.Providers.Attempt.t()) :: boolean()
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec failure(LLMProxy.Providers.Attempt.t(), non_neg_integer() | nil) :: :ok
@spec reset() :: :ok
@spec start_link(keyword()) :: GenServer.on_start()
@spec status(LLMProxy.Providers.Attempt.t()) :: t()
@spec success(LLMProxy.Providers.Attempt.t()) :: :ok