Expand description
Unix-socket accept loop + per-connection line-delimited JSON
dispatch to verb handlers. The HTTP-over-TCP transport
(crate::http_server) speaks the same frame shapes, so dispatch
logic is shared.
Enums§
- Dispatch
Outcome - What
dispatchreturns. One-shot verbs (ping,stats, …) produce a single result/error frame; streaming verbs (tail_flow) produce a sequence ofEventframes terminated by anEndframe.
Constants§
- MAX_
NDJSON_ LINE_ BYTES - Hard cap on the size of one NDJSON request line. Aligns with the 1 MiB body cap on the HTTP transport so both faces of the mgmt plane reject the same magnitude of oversized input. A real verb payload is well under a kilobyte; anything larger is either a malformed framing or an adversarial slowloris-by-line attack.
Traits§
- Event
Stream - A streaming event source. The server polls
next_eventuntil the client disconnects or the stream returnsNone. - Handler
- Server-side dispatcher. Callers implement this against their own
application state and pass an
Arc<H>tospawn_unix_serverorcrate::spawn_http_server.
Functions§
- spawn_
unix_ server - Bind a Unix socket and serve mgmt requests until
cancelfires.