Skip to main content

Module protocol

Module protocol 

Source
Expand description

Protocol message parsing and formatting for the Cortex socket protocol.

Messages are newline-delimited JSON over Unix domain socket.

Structs§

HandshakeResult
Handshake response.
PoolStatus
Pool status info.
Request
A parsed protocol request.
StatusResult
Status response.

Enums§

Method
Protocol methods supported by Cortex.

Functions§

format_error
Format an error response as JSON string (newline-terminated).
format_response
Format a successful response as JSON string (newline-terminated).
parse_request
Parse a JSON request line into (id, method, params).