Current section

Files

Jump to
liter_llm lib liter_llm circuit_state.ex
Raw

lib/liter_llm/circuit_state.ex

# This file is auto-generated by alef — DO NOT EDIT.
# alef:hash:645d8ff0f3a0ef7684f9b9ea4ce1ae251a78a2a3481ecdeabf7643c53d644bb0
# To regenerate: alef generate
# To verify freshness: alef verify --exit-code
defmodule LiterLlm.CircuitState do
@moduledoc "Observable state of a circuit breaker."
@typedoc "Observable state of a circuit breaker."
@type t :: :closed | :open | :half_open
@closed :closed
@open :open
@half_open :half_open
@doc "Requests flow through normally."
@spec closed() :: t()
def closed, do: @closed
@doc "All requests are rejected; the circuit is waiting for the backoff to elapse."
@spec open() :: t()
def open, do: @open
@doc "One probe request is allowed through to test service health."
@spec half_open() :: t()
def half_open, do: @half_open
end