pub trait MessageProxyService:
Send
+ Sync
+ 'static {
type ReadMessagesStream: Stream<Item = Result<ReadMessagesResponse, Status>> + Send + 'static;
type ReadTablesStream: Stream<Item = Result<ReadTablesResponse, Status>> + Send + 'static;
// Required methods
fn write_messages<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<WriteMessagesRequest>>,
) -> Pin<Box<dyn Future<Output = Result<Response<WriteMessagesResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn read_messages<'life0, 'async_trait>(
&'life0 self,
request: Request<ReadMessagesRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::ReadMessagesStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn write_table<'life0, 'async_trait>(
&'life0 self,
request: Request<WriteTableRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<WriteTableResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn read_tables<'life0, 'async_trait>(
&'life0 self,
request: Request<ReadTablesRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::ReadTablesStream>, 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 MessageProxyServiceServer.
Required Associated Types§
Sourcetype ReadMessagesStream: Stream<Item = Result<ReadMessagesResponse, Status>> + Send + 'static
type ReadMessagesStream: Stream<Item = Result<ReadMessagesResponse, Status>> + Send + 'static
Server streaming response type for the ReadMessages method.
Sourcetype ReadTablesStream: Stream<Item = Result<ReadTablesResponse, Status>> + Send + 'static
type ReadTablesStream: Stream<Item = Result<ReadTablesResponse, Status>> + Send + 'static
Server streaming response type for the ReadTables method.
Required Methods§
Sourcefn write_messages<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<WriteMessagesRequest>>,
) -> Pin<Box<dyn Future<Output = Result<Response<WriteMessagesResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn write_messages<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<WriteMessagesRequest>>,
) -> Pin<Box<dyn Future<Output = Result<Response<WriteMessagesResponse>, 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.