AppGuard

Trait AppGuard 

Source
pub trait AppGuard:
    Send
    + Sync
    + 'static {
    type ControlChannelStream: Stream<Item = Result<ServerMessage, Status>> + Send + 'static;

    // Required methods
    fn control_channel<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Streaming<ClientMessage>>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::ControlChannelStream>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn handle_logs<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Logs>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn handle_tcp_connection<'life0, 'async_trait>(
        &'life0 self,
        request: Request<AppGuardTcpConnection>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<AppGuardTcpResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn handle_http_request<'life0, 'async_trait>(
        &'life0 self,
        request: Request<AppGuardHttpRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<AppGuardResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn handle_http_response<'life0, 'async_trait>(
        &'life0 self,
        request: Request<AppGuardHttpResponse>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<AppGuardResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn handle_smtp_request<'life0, 'async_trait>(
        &'life0 self,
        request: Request<AppGuardSmtpRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<AppGuardResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn handle_smtp_response<'life0, 'async_trait>(
        &'life0 self,
        request: Request<AppGuardSmtpResponse>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<AppGuardResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn firewall_defaults_request<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Token>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<FirewallDefaults>, 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 AppGuardServer.

Required Associated Types§

Source

type ControlChannelStream: Stream<Item = Result<ServerMessage, Status>> + Send + 'static

Server streaming response type for the ControlChannel method.

Required Methods§

Source

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

Control channel

Source

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

Logs

Source

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

TCP

Source

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

HTTP

Source

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

Source

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

SMTP

Source

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

Source

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

Other

Implementors§