pub trait WorkerToWorker: Send + Sync + 'static {
type ClientBatchRequestStream: Stream<Item = Result<BincodeEncodedPayload, Status>> + Send + 'static;
fn send_message<'life0, 'async_trait>(
&'life0 self,
request: Request<BincodeEncodedPayload>
) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn client_batch_request<'life0, 'async_trait>(
&'life0 self,
request: Request<BincodeEncodedPayload>
) -> Pin<Box<dyn Future<Output = Result<Response<Self::ClientBatchRequestStream>, Status>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
}
Expand description
Generated trait containing gRPC methods that should be implemented for use with WorkerToWorkerServer.
Required Associated Types
sourcetype ClientBatchRequestStream: Stream<Item = Result<BincodeEncodedPayload, Status>> + Send + 'static
type ClientBatchRequestStream: Stream<Item = Result<BincodeEncodedPayload, Status>> + Send + 'static
Server streaming response type for the ClientBatchRequest method.
Required Methods
Sends a worker message
sourcefn client_batch_request<'life0, 'async_trait>(
&'life0 self,
request: Request<BincodeEncodedPayload>
) -> Pin<Box<dyn Future<Output = Result<Response<Self::ClientBatchRequestStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn client_batch_request<'life0, 'async_trait>(
&'life0 self,
request: Request<BincodeEncodedPayload>
) -> Pin<Box<dyn Future<Output = Result<Response<Self::ClientBatchRequestStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
requests a number of batches that the service then streams back to the client