Skip to main content

send_request

Function send_request 

Source
pub fn send_request(
    socket: &Path,
    request: &WireRequest,
) -> Result<WireResponse, CliError>
Expand description

Send one request to the operator host and decode its single response line.

The arms build a WireRequest and call this; the transport is a short-lived tokio runtime over a Unix-domain socket (the arms are sync).

ยงErrors

CliError::OperatorProtocol when the socket is unreachable, the exchange times out, or the response is malformed; CliError::RuntimeNested when called from inside an existing tokio runtime.