SnapshotService

Trait SnapshotService 

Source
pub trait SnapshotService:
    Send
    + Sync
    + 'static {
    type StreamSnapshotStream: Stream<Item = Result<SnapshotChunk, Status>> + Send + 'static;

    // Required methods
    fn install_snapshot<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Streaming<SnapshotChunk>>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<SnapshotResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn stream_snapshot<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Streaming<SnapshotAck>>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamSnapshotStream>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn purge_log<'life0, 'async_trait>(
        &'life0 self,
        request: Request<PurgeLogRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<PurgeLogResponse>, 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 SnapshotServiceServer.

Required Associated Types§

Source

type StreamSnapshotStream: Stream<Item = Result<SnapshotChunk, Status>> + Send + 'static

Server streaming response type for the StreamSnapshot method.

Required Methods§

Source

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

Leader-driven snapshot streaming

Source

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

Learner-driven snapshot streaming

Source

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

Log compaction request

Implementors§