Skip to main content

GrpcServiceCapability

Trait GrpcServiceCapability 

Source
pub trait GrpcServiceCapability: Send + Sync {
    // Required method
    fn get_grpc_services<'life0, 'life1, 'async_trait>(
        &'life0 self,
        ctx: &'life1 ModuleCtx,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<RegisterGrpcServiceFn>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

gRPC Service capability: modules that export gRPC services.

The runtime will call this during the gRPC registration phase to collect all services that should be exposed on the shared gRPC server.

Required Methods§

Source

fn get_grpc_services<'life0, 'life1, 'async_trait>( &'life0 self, ctx: &'life1 ModuleCtx, ) -> Pin<Box<dyn Future<Output = Result<Vec<RegisterGrpcServiceFn>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Returns all gRPC services this module wants to expose.

Each installer adds one service to the tonic::Server builder.

Implementors§