pub struct MountainServiceClient<T> {
inner: Grpc<T>,
}Expand description
Service running on the Mountain host, listening for requests from Cocoon.
Fields§
§inner: Grpc<T>Implementations§
Source§impl MountainServiceClient<Channel>
impl MountainServiceClient<Channel>
Source§impl<T> MountainServiceClient<T>
impl<T> MountainServiceClient<T>
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
pub fn with_interceptor<F>( inner: T, interceptor: F, ) -> MountainServiceClient<InterceptedService<T, F>>
Sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
Sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
Sourcepub fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
Sourcepub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
Sourcepub async fn process_cocoon_request(
&mut self,
request: impl IntoRequest<GenericRequest>,
) -> Result<Response<GenericResponse>, Status>
pub async fn process_cocoon_request( &mut self, request: impl IntoRequest<GenericRequest>, ) -> Result<Response<GenericResponse>, Status>
A generic request-response method for Cocoon to call a function on Mountain.
Sourcepub async fn send_cocoon_notification(
&mut self,
request: impl IntoRequest<GenericNotification>,
) -> Result<Response<Empty>, Status>
pub async fn send_cocoon_notification( &mut self, request: impl IntoRequest<GenericNotification>, ) -> Result<Response<Empty>, Status>
A generic fire-and-forget method for Cocoon to send a notification to Mountain.
Sourcepub async fn cancel_operation(
&mut self,
request: impl IntoRequest<CancelOperationRequest>,
) -> Result<Response<Empty>, Status>
pub async fn cancel_operation( &mut self, request: impl IntoRequest<CancelOperationRequest>, ) -> Result<Response<Empty>, Status>
A method for Cocoon to request that Mountain cancel a long-running operation.
Sourcepub async fn open_channel_from_cocoon(
&mut self,
request: impl IntoStreamingRequest<Message = Envelope>,
) -> Result<Response<Streaming<Envelope>>, Status>
pub async fn open_channel_from_cocoon( &mut self, request: impl IntoStreamingRequest<Message = Envelope>, ) -> Result<Response<Streaming<Envelope>>, Status>
LAND-PATCH B7-S6 P2: bidirectional streaming channel.
Multiplexes every notification, request, and response over a
single h2 stream. Each side reads frames asynchronously and
routes by correlation_id (request/response) or by
channel (notification fan-out).
Replaces the unary methods above for any caller that needs concurrent / parallel dispatch. The unary methods stay for backward compatibility and for callers that explicitly want a single round-trip.
Trait Implementations§
Source§impl<T: Clone> Clone for MountainServiceClient<T>
impl<T: Clone> Clone for MountainServiceClient<T>
Source§fn clone(&self) -> MountainServiceClient<T>
fn clone(&self) -> MountainServiceClient<T>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<T> !Freeze for MountainServiceClient<T>
impl<T> RefUnwindSafe for MountainServiceClient<T>where
T: RefUnwindSafe,
impl<T> Send for MountainServiceClient<T>where
T: Send,
impl<T> Sync for MountainServiceClient<T>where
T: Sync,
impl<T> Unpin for MountainServiceClient<T>where
T: Unpin,
impl<T> UnsafeUnpin for MountainServiceClient<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for MountainServiceClient<T>where
T: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].