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 str
The GRPC service to call.
method: &'a str
The 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.
Implementations§
Auto Trait Implementations§
impl<'a> Freeze for GrpcCall<'a>
impl<'a> !RefUnwindSafe for GrpcCall<'a>
impl<'a> !Send for GrpcCall<'a>
impl<'a> !Sync for GrpcCall<'a>
impl<'a> Unpin for GrpcCall<'a>
impl<'a> !UnwindSafe for GrpcCall<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more