pub trait MessageProxy: Send + Sync + 'static {
    type ReadMessagesStream: Stream<Item = Result<LogMsg, Status>> + Send + 'static;

    // Required methods
    fn write_messages<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Streaming<LogMsg>>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn read_messages<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Empty>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::ReadMessagesStream>, 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 MessageProxyServer.

Required Associated Types§

source

type ReadMessagesStream: Stream<Item = Result<LogMsg, Status>> + Send + 'static

Server streaming response type for the ReadMessages method.

Required Methods§

source

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

TODO(jan): Would it be more efficient to send a “message batch” instead of individual messages? It may allow us to amortize the overhead of the gRPC protocol.

source

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

Implementors§