pub trait QueryService: Send + Sync + 'static {
type OpenStreamStream: Stream<Item = Result<QueryProviderInbound, Status>> + Send + 'static;
type QueryStream: Stream<Item = Result<QueryResponse, Status>> + Send + 'static;
type SubscriptionStream: Stream<Item = Result<SubscriptionQueryResponse, Status>> + Send + 'static;
// Required methods
fn open_stream<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<QueryProviderOutbound>>
) -> Pin<Box<dyn Future<Output = Result<Response<Self::OpenStreamStream>, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn query<'life0, 'async_trait>(
&'life0 self,
request: Request<QueryRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<Self::QueryStream>, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn subscription<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<SubscriptionQueryRequest>>
) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscriptionStream>, 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 QueryServiceServer.
Required Associated Types§
sourcetype OpenStreamStream: Stream<Item = Result<QueryProviderInbound, Status>> + Send + 'static
type OpenStreamStream: Stream<Item = Result<QueryProviderInbound, Status>> + Send + 'static
Server streaming response type for the OpenStream method.
sourcetype QueryStream: Stream<Item = Result<QueryResponse, Status>> + Send + 'static
type QueryStream: Stream<Item = Result<QueryResponse, Status>> + Send + 'static
Server streaming response type for the Query method.
sourcetype SubscriptionStream: Stream<Item = Result<SubscriptionQueryResponse, Status>> + Send + 'static
type SubscriptionStream: Stream<Item = Result<SubscriptionQueryResponse, Status>> + Send + 'static
Server streaming response type for the Subscription method.
Required Methods§
sourcefn open_stream<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<QueryProviderOutbound>>
) -> Pin<Box<dyn Future<Output = Result<Response<Self::OpenStreamStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn open_stream<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<QueryProviderOutbound>>
) -> Pin<Box<dyn Future<Output = Result<Response<Self::OpenStreamStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Opens a Query- and Instruction stream to AxonServer.
sourcefn query<'life0, 'async_trait>(
&'life0 self,
request: Request<QueryRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<Self::QueryStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn query<'life0, 'async_trait>(
&'life0 self,
request: Request<QueryRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<Self::QueryStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Sends a point-to-point or scatter-gather Query
sourcefn subscription<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<SubscriptionQueryRequest>>
) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscriptionStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn subscription<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<SubscriptionQueryRequest>>
) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscriptionStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Opens a Subscription Query