Trait ExecCompat

Source
pub trait ExecCompat:
    HasConfig
    + Send
    + Sync {
    // Provided methods
    fn container_exec<'a>(
        &'a self,
        name: &'a str,
        control: ContainerExecBody,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>> { ... }
    fn exec_inspect<'a>(
        &'a self,
        id: &'a str,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>> { ... }
    fn exec_resize<'a>(
        &'a self,
        id: &'a str,
        params: Option<ExecResize>,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>> { ... }
    fn exec_start<'a>(
        &'a self,
        id: &'a str,
        control: ExecStartBody,
    ) -> Pin<Box<dyn Future<Output = Result<Bytes, Error>> + Send + 'a>> { ... }
}
Available on crate feature v4 only.

Provided Methods§

Source

fn container_exec<'a>( &'a self, name: &'a str, control: ContainerExecBody, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>>

POST /containers/{name}/exec

Create an exec instance

Create an exec session to run a command inside a running container. Exec sessions will be automatically removed 5 minutes after they exit.

Source

fn exec_inspect<'a>( &'a self, id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>>

GET /exec/{id}/json

Inspect an exec instance

Return low-level information about an exec instance.

Source

fn exec_resize<'a>( &'a self, id: &'a str, params: Option<ExecResize>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>>

POST /exec/{id}/resize

Resize an exec instance

Resize the TTY session used by an exec instance. This endpoint only works if tty was specified as part of creating and starting the exec instance.

Source

fn exec_start<'a>( &'a self, id: &'a str, control: ExecStartBody, ) -> Pin<Box<dyn Future<Output = Result<Bytes, Error>> + Send + 'a>>

POST /exec/{id}/start

Start an exec instance

Starts a previously set up exec instance. If detach is true, this endpoint returns immediately after starting the command. Otherwise, it sets up an interactive session with the command.

Implementors§