Trait common_meta::ddl::ProcedureExecutor

source ·
pub trait ProcedureExecutor: Send + Sync {
    // Required methods
    fn submit_ddl_task<'life0, 'life1, 'async_trait>(
        &'life0 self,
        ctx: &'life1 ExecutorContext,
        request: SubmitDdlTaskRequest,
    ) -> Pin<Box<dyn Future<Output = Result<SubmitDdlTaskResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn migrate_region<'life0, 'life1, 'async_trait>(
        &'life0 self,
        ctx: &'life1 ExecutorContext,
        request: MigrateRegionRequest,
    ) -> Pin<Box<dyn Future<Output = Result<MigrateRegionResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn query_procedure_state<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        ctx: &'life1 ExecutorContext,
        pid: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<ProcedureStateResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn list_procedures<'life0, 'life1, 'async_trait>(
        &'life0 self,
        ctx: &'life1 ExecutorContext,
    ) -> Pin<Box<dyn Future<Output = Result<ProcedureDetailResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

The procedure executor that accepts ddl, region migration task etc.

Required Methods§

source

fn submit_ddl_task<'life0, 'life1, 'async_trait>( &'life0 self, ctx: &'life1 ExecutorContext, request: SubmitDdlTaskRequest, ) -> Pin<Box<dyn Future<Output = Result<SubmitDdlTaskResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Submit a ddl task

source

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

Submit a region migration task

source

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

Query the procedure state by its id

source

fn list_procedures<'life0, 'life1, 'async_trait>( &'life0 self, ctx: &'life1 ExecutorContext, ) -> Pin<Box<dyn Future<Output = Result<ProcedureDetailResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§

source§

impl ProcedureExecutor for DdlManager

TODO(dennis): let DdlManager implement ProcedureExecutor looks weird, find some way to refactor it.