Trait Api

Source
pub trait Api<C: Send + Sync> {
    // Required methods
    fn get_task_list<'life0, 'life1, 'async_trait>(
        &'life0 self,
        context: &'life1 C,
    ) -> Pin<Box<dyn Future<Output = Result<GetTaskListResponse, ApiError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_task_log_by_id<'life0, 'life1, 'async_trait>(
        &'life0 self,
        get_task_log_request: GetTaskLogRequest,
        context: &'life1 C,
    ) -> Pin<Box<dyn Future<Output = Result<GetTaskLogByIdResponse, ApiError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn pause_task_by_id<'life0, 'life1, 'async_trait>(
        &'life0 self,
        simple_id_request: SimpleIdRequest,
        context: &'life1 C,
    ) -> Pin<Box<dyn Future<Output = Result<PauseTaskByIdResponse, ApiError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn resume_task_by_id<'life0, 'life1, 'async_trait>(
        &'life0 self,
        simple_id_request: SimpleIdRequest,
        context: &'life1 C,
    ) -> Pin<Box<dyn Future<Output = Result<ResumeTaskByIdResponse, ApiError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn start_task<'life0, 'life1, 'async_trait>(
        &'life0 self,
        start_task_request: StartTaskRequest,
        context: &'life1 C,
    ) -> Pin<Box<dyn Future<Output = Result<StartTaskResponse, ApiError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn stop_task_by_id<'life0, 'life1, 'async_trait>(
        &'life0 self,
        simple_id_request: SimpleIdRequest,
        context: &'life1 C,
    ) -> Pin<Box<dyn Future<Output = Result<StopTaskByIdResponse, ApiError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided method
    fn poll_ready(
        &self,
        _cx: &mut Context<'_>,
    ) -> Poll<Result<(), Box<dyn Error + Send + Sync + 'static>>> { ... }
}
Expand description

API

Required Methods§

Source

fn get_task_list<'life0, 'life1, 'async_trait>( &'life0 self, context: &'life1 C, ) -> Pin<Box<dyn Future<Output = Result<GetTaskListResponse, ApiError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get list of running tasks

Source

fn get_task_log_by_id<'life0, 'life1, 'async_trait>( &'life0 self, get_task_log_request: GetTaskLogRequest, context: &'life1 C, ) -> Pin<Box<dyn Future<Output = Result<GetTaskLogByIdResponse, ApiError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

get log

Source

fn pause_task_by_id<'life0, 'life1, 'async_trait>( &'life0 self, simple_id_request: SimpleIdRequest, context: &'life1 C, ) -> Pin<Box<dyn Future<Output = Result<PauseTaskByIdResponse, ApiError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Pause a task by id

Source

fn resume_task_by_id<'life0, 'life1, 'async_trait>( &'life0 self, simple_id_request: SimpleIdRequest, context: &'life1 C, ) -> Pin<Box<dyn Future<Output = Result<ResumeTaskByIdResponse, ApiError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Resume a task by id

Source

fn start_task<'life0, 'life1, 'async_trait>( &'life0 self, start_task_request: StartTaskRequest, context: &'life1 C, ) -> Pin<Box<dyn Future<Output = Result<StartTaskResponse, ApiError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Start a new task

Source

fn stop_task_by_id<'life0, 'life1, 'async_trait>( &'life0 self, simple_id_request: SimpleIdRequest, context: &'life1 C, ) -> Pin<Box<dyn Future<Output = Result<StopTaskByIdResponse, ApiError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Stop a task by id

Provided Methods§

Source

fn poll_ready( &self, _cx: &mut Context<'_>, ) -> Poll<Result<(), Box<dyn Error + Send + Sync + 'static>>>

Implementors§

Source§

impl<S, C> Api<C> for Client<S, C>
where S: Service<(Request<Body>, C), Response = Response<Body>> + Clone + Sync + Send + 'static, S::Future: Send + 'static, S::Error: Into<Box<dyn Error + Send + Sync + 'static>> + Display, C: Has<XSpanIdString> + Clone + Send + Sync + 'static,