Skip to main content

Module client

Module client 

Source
Expand description

Typed Unix-socket client. Same frame shapes as crate::server. One Unix-socket connection per call: the API stays a simple call(verb, args) -> result, and a future multiplexed transport can be slotted in without changing the call shape.

Structs§

UnixMgmtClient
Single-shot typed Unix mgmt client. Each call opens a fresh connection. Re-using one client for many calls works too — the struct holds no persistent state across invocations.

Enums§

MgmtClientError

Constants§

CONNECT_TIMEOUT
Maximum time to wait for UnixStream::connect to return. The mgmt daemon is on the same host as the CLI; if the kernel doesn’t grant the connection in five seconds something is badly wrong (daemon not running, socket file stale, FS perms wrong) and operators want the failure mode to be a fast error rather than a hang.
ONESHOT_TIMEOUT
Maximum time between server-sourced bytes on a one-shot call. A server stall after we’ve sent the request shouldn’t leave the operator’s terminal hanging; this fires MgmtClientError::Timeout and lets the shell prompt return.