Runtime drain control for deployment-safe LLMProxy shutdowns.
Drain mode is an operational state: new user work is rejected while existing work is allowed to finish. Control is exposed through local RPC/release tasks, not through public HTTP routes.
Summary
Types
@type ref() :: reference()
@type status() :: %{ draining: boolean(), ready: boolean(), serving: boolean(), active: %{ total: non_neg_integer(), requests: non_neg_integer(), streams: non_neg_integer(), agents: non_neg_integer() } }
@type work_kind() :: :request | :stream | :agent
Functions
@spec await_empty(timeout()) :: :ok | {:error, :timeout}
@spec cancel() :: status()
@spec child_spec(keyword()) :: Supervisor.child_spec()
@spec draining?() :: boolean()
@spec leave(ref()) :: :ok
@spec start_link(keyword()) :: GenServer.on_start()
@spec status() :: status()