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§
Sourcetype ControlChannelStream: Stream<Item = Result<ServerMessage, Status>> + Send + 'static
type ControlChannelStream: Stream<Item = Result<ServerMessage, Status>> + Send + 'static
Server streaming response type for the ControlChannel method.
Required Methods§
Sourcefn 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 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
Sourcefn 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_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
Sourcefn 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_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
Sourcefn 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_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
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,
Sourcefn 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_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