Expand description
Mesh wire format of a forwarded inference request (frame types
InferRequest 0x10 and InferResponse 0x11).
InferRequest [ver u8][head_len u32 BE][head JSON][body bytes]
InferResponse [kind u8][data] kind 0 head (JSON {status, content_type})
kind 1 chunk (raw bytes)
kind 2 end
kind 3 error (UTF-8 text)The request carries no Authorization: the credentials of the client on
one node are not forwarded to another. Everything decoded from the wire
is revalidated as if it came from a client, because it came from a peer.
Enums§
- Resp
- One response frame.
Constants§
- CHUNK_
BYTES - Largest body chunk put in one response frame.
- MAX_
ROLE - Longest role name.
- WIRE_
VERSION - Wire version of
InferRequest.
Functions§
- decode_
request - Decode and revalidate a request received from a peer.
- decode_
resp - Decode a response frame payload received from a peer.
- encode_
request - Encode a request for the mesh (without its
Authorization). - encode_
resp - Encode a response frame payload.