Skip to main content

QueueService

Trait QueueService 

Source
pub trait QueueService:
    Send
    + Sync
    + 'static {
    // Required methods
    fn send<'life0, 'async_trait>(
        &'life0 self,
        request: Request<SendRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<SendResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn receive<'life0, 'async_trait>(
        &'life0 self,
        request: Request<ReceiveRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<ReceiveResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn ack<'life0, 'async_trait>(
        &'life0 self,
        request: Request<AckRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<AckResponse>, 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 QueueServiceServer.

Required Methods§

Source

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

Send a message to the queue

Source

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

Receive messages from the queue

Source

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

Acknowledge processing of a message (permanently removes from queue)

Implementors§