pub struct GrpcCall<'a> {
pub upstream: Upstream<'a>,
pub service: &'a str,
pub method: &'a str,
pub initial_metadata: Vec<(&'a str, &'a [u8])>,
pub message: Option<&'a [u8]>,
pub timeout: Option<Duration>,
pub callback: Option<Box<dyn FnOnce(&mut DowncastBox<dyn RootContext>, &GrpcCallResponse)>>,
}Expand description
Outbound GRPC call
Fields§
§upstream: Upstream<'a>Upstream cluster to send the request to.
service: &'a strThe GRPC service to call.
method: &'a strThe GRPC service method to call.
initial_metadata: Vec<(&'a str, &'a [u8])>Initial GRPC metadata to send with the request.
message: Option<&'a [u8]>An optional request body to send with the request.
timeout: Option<Duration>A timeout on waiting for a response. Default is 10 seconds.
callback: Option<Box<dyn FnOnce(&mut DowncastBox<dyn RootContext>, &GrpcCallResponse)>>Callback to call when a response has arrived.