Expand description
The agent’s end of the runner channel: length-prefixed JSON and the handshake.
Each message is a 4-byte big-endian length followed by that many bytes of UTF-8 JSON (see
schedr-model, runner). Generic over any byte stream, so it is tested in memory.
Structs§
- Messages
- A stream read a message at a time, safe to cancel: a message read in part when its read
is dropped (a
select!another branch won) waits here for its rest, whereread_messagewould lose it and read the rest as a new message (B57).
Enums§
- Channel
Error - Why a message couldn’t be exchanged with the runner.
Functions§
- accept_
runner - Accepts a newly connected runner: reads its
hello, refuses a version mismatch, and welcomes it otherwise. - read_
message - Receives one message.
- write_
message - Sends one message.