Skip to main content

Module ws_protocol

Module ws_protocol 

Source
Expand description

WebSocket message protocol for the control plane.

Three message types over JSON text frames:

  • Request (client -> server): {"id": "uuid", "method": "...", "params": {...}}
  • Response (server -> client): {"id": "uuid", "result": {...}} or {"id": "uuid", "error": "..."}
  • Event (either direction): {"event": "...", "payload": {...}}

Structs§

WsEvent
A fire-and-forget event in either direction.
WsRequest
A request from client to server, expecting a response with the same id.
WsResponse
A response from server to client, matching a request id.

Enums§

WsMessage
Discriminated union for parsing any incoming WS text frame.