wireman_core::client

Function call_unary_async

source
pub async fn call_unary_async(
    req: &RequestMessage,
    tls_config: Option<TlsConfig>,
) -> Result<ResponseMessage>
Expand description

Creates a new gRPC client and sends a message to a gRPC server. This method is async.

ยงErrors

  • Internal error calling the gRPC server
Examples found in repository?
examples/reflection.rs (line 31)
29
30
31
32
33
pub async fn do_request(req: &RequestMessage) -> Result<ResponseMessage> {
    let tls_config = TlsConfig::native();
    let resp = call_unary_async(req, Some(tls_config)).await?;
    Ok(resp)
}