Backplane. AiProtocol. Wire
(backplane_ai_protocol v0.7.0)
Copy Markdown
Pure Backplane WebSocket V1 admission, correlation, sequencing, and credit contract.
Unknown or terminal request IDs are rejected without allocating state. At the lifetime ID limit the connection enters draining state: active requests may terminate, but no new request is admitted.
Summary
Types
Functions
@spec accept_request(t(), String.t()) :: {:ok, t()} | {:error, Backplane.AiProtocol.Error.t()} | {:error, Backplane.AiProtocol.Error.t(), t()}
@spec grant_credit(t(), String.t(), non_neg_integer()) :: {:ok, t()} | {:error, Backplane.AiProtocol.Error.t()}
@spec handshake(t(), map()) :: {:ok, t()} | {:error, Backplane.AiProtocol.Error.t()}
@spec hello(map()) :: {:ok, map()} | {:error, Backplane.AiProtocol.Error.t()}
@spec new() :: t()
@spec send_data(t(), map()) :: {:ok, t(), map()} | {:error, Backplane.AiProtocol.Error.t()}
@spec terminal(t(), map()) :: {:ok, t(), map()} | {:error, Backplane.AiProtocol.Error.t()}
@spec welcome(map()) :: {:ok, map()} | {:error, Backplane.AiProtocol.Error.t()}