Skip to main content

TaskService

Trait TaskService 

Source
pub trait TaskService:
    Send
    + Sync
    + 'static {
    type CreateTaskStream: Stream<Item = Result<TaskInfoResponse, Status>> + Send + 'static;
    type ExecuteStream: Stream<Item = Result<GetDataResponse, Status>> + Send + 'static;
    type IngestDmlStream: Stream<Item = Result<IngestDmlResponse, Status>> + Send + 'static;

    // Required methods
    fn create_task<'life0, 'async_trait>(
        &'life0 self,
        request: Request<CreateTaskRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::CreateTaskStream>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn cancel_task<'life0, 'async_trait>(
        &'life0 self,
        request: Request<CancelTaskRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<CancelTaskResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn execute<'life0, 'async_trait>(
        &'life0 self,
        request: Request<ExecuteRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::ExecuteStream>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn fast_insert<'life0, 'async_trait>(
        &'life0 self,
        request: Request<FastInsertRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<FastInsertResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn ingest_dml<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Streaming<IngestDmlRequest>>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::IngestDmlStream>, 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 TaskServiceServer.

Required Associated Types§

Source

type CreateTaskStream: Stream<Item = Result<TaskInfoResponse, Status>> + Send + 'static

Server streaming response type for the CreateTask method.

Source

type ExecuteStream: Stream<Item = Result<GetDataResponse, Status>> + Send + 'static

Server streaming response type for the Execute method.

Source

type IngestDmlStream: Stream<Item = Result<IngestDmlResponse, Status>> + Send + 'static

Server streaming response type for the IngestDml method.

Required Methods§

Source

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

Source

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

Cancel an already-died (self execution-failure, previous aborted, completed) task will still succeed.

Source

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

Source

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

A lightweight version insert, only for non-pgwire insert, such as inserts from webhooks and websockets.

Source

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

DML stream with async persistence ack, used by the WebSocket ingest endpoint.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§