Trait zebra_rpc::indexer::indexer_server::Indexer

source ·
pub trait Indexer:
    Send
    + Sync
    + 'static {
    type ChainTipChangeStream: Stream<Item = Result<Empty, Status>> + Send + 'static;

    // Required method
    fn chain_tip_change<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Empty>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::ChainTipChangeStream>, 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 IndexerServer.

Required Associated Types§

source

type ChainTipChangeStream: Stream<Item = Result<Empty, Status>> + Send + 'static

Server streaming response type for the ChainTipChange method.

Required Methods§

source

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

Notifies listeners of chain tip changes

Implementors§

source§

impl<ReadStateService, Tip> Indexer for IndexerRPC<ReadStateService, Tip>
where ReadStateService: Service<ReadRequest, Response = ReadResponse, Error = BoxError> + Clone + Send + Sync + 'static, <ReadStateService as Service<ReadRequest>>::Future: Send, Tip: ChainTip + Clone + Send + Sync + 'static,

source§

type ChainTipChangeStream = Pin<Box<dyn Stream<Item = Result<Empty, Status>> + Send>>