pub trait TaskService:
Send
+ Sync
+ 'static {
type WatchTasksStream: Stream<Item = Result<WatchTasksResponse, Status>> + Send + 'static;
type StreamTaskLogsStream: Stream<Item = Result<StreamTaskLogsResponse, Status>> + Send + 'static;
// Required methods
fn create_task<'life0, 'async_trait>(
&'life0 self,
request: Request<CreateTaskRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<CreateTaskResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn apply_task<'life0, 'async_trait>(
&'life0 self,
request: Request<ApplyTaskRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ApplyTaskResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_task<'life0, 'async_trait>(
&'life0 self,
request: Request<GetTaskRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetTaskResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_tasks<'life0, 'async_trait>(
&'life0 self,
request: Request<ListTasksRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ListTasksResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn watch_tasks<'life0, 'async_trait>(
&'life0 self,
request: Request<WatchTasksRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::WatchTasksStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_task_runs<'life0, 'async_trait>(
&'life0 self,
request: Request<ListTaskRunsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ListTaskRunsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete_task<'life0, 'async_trait>(
&'life0 self,
request: Request<DeleteTaskRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<DeleteTaskResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn stream_task_logs<'life0, 'async_trait>(
&'life0 self,
request: Request<StreamTaskLogsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamTaskLogsStream>, 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§
Sourcetype WatchTasksStream: Stream<Item = Result<WatchTasksResponse, Status>> + Send + 'static
type WatchTasksStream: Stream<Item = Result<WatchTasksResponse, Status>> + Send + 'static
Server streaming response type for the WatchTasks method.
Sourcetype StreamTaskLogsStream: Stream<Item = Result<StreamTaskLogsResponse, Status>> + Send + 'static
type StreamTaskLogsStream: Stream<Item = Result<StreamTaskLogsResponse, Status>> + Send + 'static
Server streaming response type for the StreamTaskLogs method.
Required Methods§
Sourcefn create_task<'life0, 'async_trait>(
&'life0 self,
request: Request<CreateTaskRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<CreateTaskResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_task<'life0, 'async_trait>(
&'life0 self,
request: Request<CreateTaskRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<CreateTaskResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create a named Task resource.
Sourcefn apply_task<'life0, 'async_trait>(
&'life0 self,
request: Request<ApplyTaskRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ApplyTaskResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn apply_task<'life0, 'async_trait>(
&'life0 self,
request: Request<ApplyTaskRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ApplyTaskResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Declaratively create or update one named Task resource.
Sourcefn get_task<'life0, 'async_trait>(
&'life0 self,
request: Request<GetTaskRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetTaskResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_task<'life0, 'async_trait>(
&'life0 self,
request: Request<GetTaskRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetTaskResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get one Task resource.
Sourcefn list_tasks<'life0, 'async_trait>(
&'life0 self,
request: Request<ListTasksRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ListTasksResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_tasks<'life0, 'async_trait>(
&'life0 self,
request: Request<ListTasksRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ListTasksResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List tasks with optional filters and pagination.
Sourcefn watch_tasks<'life0, 'async_trait>(
&'life0 self,
request: Request<WatchTasksRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::WatchTasksStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn watch_tasks<'life0, 'async_trait>(
&'life0 self,
request: Request<WatchTasksRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::WatchTasksStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Watch task collection changes.
Sourcefn list_task_runs<'life0, 'async_trait>(
&'life0 self,
request: Request<ListTaskRunsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ListTaskRunsResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_task_runs<'life0, 'async_trait>(
&'life0 self,
request: Request<ListTaskRunsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ListTaskRunsResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List the attempt history of one task.
Sourcefn delete_task<'life0, 'async_trait>(
&'life0 self,
request: Request<DeleteTaskRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<DeleteTaskResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_task<'life0, 'async_trait>(
&'life0 self,
request: Request<DeleteTaskRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<DeleteTaskResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stop a task and purge its history.
Sourcefn stream_task_logs<'life0, 'async_trait>(
&'life0 self,
request: Request<StreamTaskLogsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamTaskLogsStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stream_task_logs<'life0, 'async_trait>(
&'life0 self,
request: Request<StreamTaskLogsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamTaskLogsStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Live-tail stdout/stderr events for a task.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".