Skip to main content

ControlService

Trait ControlService 

Source
pub trait ControlService:
    Send
    + Sync
    + 'static {
    type StreamLogsStream: Stream<Item = Result<LogChunk, Status>> + Send + 'static;

    // Required methods
    fn run_workload<'life0, 'async_trait>(
        &'life0 self,
        request: Request<WorkloadCommand>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<WorkloadResult>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn stream_logs<'life0, 'async_trait>(
        &'life0 self,
        request: Request<LogRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamLogsStream>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn exec<'life0, 'async_trait>(
        &'life0 self,
        request: Request<ExecRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<ExecResponse>, 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 ControlServiceServer.

Required Associated Types§

Source

type StreamLogsStream: Stream<Item = Result<LogChunk, Status>> + Send + 'static

Server streaming response type for the StreamLogs method.

Required Methods§

Source

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

Control plane tells agent to create/start/stop/remove workloads

Source

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

Control plane requests logs from agent

Source

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

Control plane requests exec inside a workload

Implementors§