Skip to main content

ControlService

Trait ControlService 

Source
pub trait ControlService:
    Send
    + Sync
    + 'static {
    // Required methods
    fn register_node<'life0, 'async_trait>(
        &'life0 self,
        request: Request<RegisterNodeRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<RegisterNodeResponse>, Status>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn report<'life0, 'async_trait>(
        &'life0 self,
        request: Request<ReportRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<ReportResponse>, Status>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn health_check<'life0, 'async_trait>(
        &'life0 self,
        request: Request<HealthCheckRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<HealthCheckResponse>, Status>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
}
Expand description

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

Required Methods§

Source

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

Node registration, called when establishing connection

Source

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

Node status reporting

Source

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

Health check

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§