Skip to main content

MountainService

Trait MountainService 

Source
pub trait MountainService:
    Send
    + Sync
    + 'static {
    type OpenChannelFromCocoonStream: Stream<Item = Result<Envelope, Status>> + Send + 'static;

    // Required methods
    fn process_cocoon_request<'life0, 'async_trait>(
        &'life0 self,
        request: Request<GenericRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<GenericResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn send_cocoon_notification<'life0, 'async_trait>(
        &'life0 self,
        request: Request<GenericNotification>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn cancel_operation<'life0, 'async_trait>(
        &'life0 self,
        request: Request<CancelOperationRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn open_channel_from_cocoon<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Streaming<Envelope>>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::OpenChannelFromCocoonStream>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Generated trait containing gRPC methods that should be implemented for use with MountainServiceServer.

Required Associated Types§

Source

type OpenChannelFromCocoonStream: Stream<Item = Result<Envelope, Status>> + Send + 'static

Server streaming response type for the OpenChannelFromCocoon method.

Required Methods§

Source

fn process_cocoon_request<'life0, 'async_trait>( &'life0 self, request: Request<GenericRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<GenericResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

A generic request-response method for Cocoon to call a function on Mountain.

Source

fn send_cocoon_notification<'life0, 'async_trait>( &'life0 self, request: Request<GenericNotification>, ) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

A generic fire-and-forget method for Cocoon to send a notification to Mountain.

Source

fn cancel_operation<'life0, 'async_trait>( &'life0 self, request: Request<CancelOperationRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

A method for Cocoon to request that Mountain cancel a long-running operation.

Source

fn open_channel_from_cocoon<'life0, 'async_trait>( &'life0 self, request: Request<Streaming<Envelope>>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::OpenChannelFromCocoonStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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.

Implementors§