Trait QueryService

Source
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 Self: 'async_trait,
             'life0: '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 Self: 'async_trait,
             'life0: '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 Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Generated trait containing gRPC methods that should be implemented for use with QueryServiceServer.

Required Associated Types§

Source

type OpenStreamStream: Stream<Item = Result<QueryProviderInbound, Status>> + Send + 'static

Server streaming response type for the OpenStream method.

Source

type QueryStream: Stream<Item = Result<QueryResponse, Status>> + Send + 'static

Server streaming response type for the Query method.

Source

type SubscriptionStream: Stream<Item = Result<SubscriptionQueryResponse, Status>> + Send + 'static

Server streaming response type for the Subscription method.

Required Methods§

Source

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 Self: 'async_trait, 'life0: 'async_trait,

Opens a Query- and Instruction stream to AxonServer.

Source

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

Sends a point-to-point or scatter-gather Query

Source

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 Self: 'async_trait, 'life0: 'async_trait,

Opens a Subscription Query

Implementors§