CocoonService

Trait CocoonService 

Source
pub trait CocoonService:
    Send
    + Sync
    + 'static {
    // Required methods
    fn process_mountain_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_mountain_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 CocoonServiceServer.

Required Methods§

Source

fn process_mountain_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 Mountain to call a function on Cocoon.

Source

fn send_mountain_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 Mountain to send a notification to Cocoon.

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 Mountain to request that Cocoon cancel a long-running operation.

Implementors§