Skip to main content

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;
    fn get_tracked_veth<'life0, 'async_trait>(
        &'life0 self,
        request: Request<()>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<VethResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_tracked_veth_from_hash_map<'life0, 'async_trait>(
        &'life0 self,
        request: Request<()>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<VethHashMapResponse>, 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 endpoint

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 endpoint

Source

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

TODO: can i combine this 2 endpoints? active veth info endpoint

Source

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

get tracked veth from blocklist

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§