Skip to main content

Execution

Trait Execution 

Source
pub trait Execution:
    Send
    + Sync
    + 'static {
    type AttachStream: Stream<Item = Result<ExecOutput, Status>> + Send + 'static;

    // Required methods
    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;
    fn attach<'life0, 'async_trait>(
        &'life0 self,
        request: Request<AttachRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::AttachStream>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn send_input<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Streaming<ExecStdin>>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<SendInputAck>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn wait<'life0, 'async_trait>(
        &'life0 self,
        request: Request<WaitRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<WaitResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn kill<'life0, 'async_trait>(
        &'life0 self,
        request: Request<KillRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<KillResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn resize_tty<'life0, 'async_trait>(
        &'life0 self,
        request: Request<ResizeTtyRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<ResizeTtyResponse>, 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 ExecutionServer.

Required Associated Types§

Source

type AttachStream: Stream<Item = Result<ExecOutput, Status>> + Send + 'static

Server streaming response type for the Attach method.

Required Methods§

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,

Start execution immediately.

Source

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

Attach to stdout/stderr (output only).

Source

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

Send stdin (optional).

Source

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

Wait for execution to complete (blocking).

Source

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

Kill execution (send signal)

Source

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

Resize TTY window (PTY executions only)

Implementors§