MountainService

Trait MountainService 

Source
pub trait MountainService:
    Send
    + Sync
    + '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;
}
Expand description

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

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.

Implementors§