common_function::handlers

Trait ProcedureServiceHandler

source
pub trait ProcedureServiceHandler: Send + Sync {
    // Required methods
    fn migrate_region<'life0, 'async_trait>(
        &'life0 self,
        request: MigrateRegionRequest,
    ) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn query_procedure_state<'life0, 'life1, 'async_trait>(
        &'life0 self,
        pid: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<ProcedureStateResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

A trait for handling procedure service requests in QueryEngine.

Required Methods§

source

fn migrate_region<'life0, 'async_trait>( &'life0 self, request: MigrateRegionRequest, ) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Migrate a region from source peer to target peer, returns the procedure id if success.

source

fn query_procedure_state<'life0, 'life1, 'async_trait>( &'life0 self, pid: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<ProcedureStateResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Query the procedure’ state by its id

Implementors§