Agent

Trait Agent 

Source
pub trait Agent:
    Send
    + Sync
    + 'static {
    // Required methods
    fn active_connections<'life0, 'async_trait>(
        &'life0 self,
        request: Request<RequestActiveConnections>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<ActiveConnectionResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn add_ip_to_blocklist<'life0, 'async_trait>(
        &'life0 self,
        request: Request<AddIpToBlocklistRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<BlocklistResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn check_blocklist<'life0, 'async_trait>(
        &'life0 self,
        request: Request<()>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<BlocklistResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn rm_ip_from_blocklist<'life0, 'async_trait>(
        &'life0 self,
        request: Request<RmIpFromBlocklistRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<RmIpFromBlocklistResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_latency_metrics<'life0, 'async_trait>(
        &'life0 self,
        request: Request<()>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<LatencyMetricsResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_dropped_packets_metrics<'life0, 'async_trait>(
        &'life0 self,
        request: Request<()>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<DroppedPacketsResponse>, 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 AgentServer.

Required Methods§

Source

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

active connections endpoint

Source

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

create blocklist endpoint

Source

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

Source

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

remove ip from blocklist endpoint

Source

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

metrics data

Source

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

dropped packets

Implementors§