Trait Exec

Source
pub trait Exec:
    HasConfig
    + Send
    + Sync {
    // Provided methods
    fn container_exec_libpod<'a>(
        &'a self,
        name: &'a str,
        control: ContainerExecLibpodBody,
    ) -> Pin<Box<dyn Future<Output = Result<ContainerExecLibpod201, Error>> + Send + 'a>> { ... }
    fn exec_inspect_libpod<'a>(
        &'a self,
        id: &'a str,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>> { ... }
    fn exec_resize_libpod<'a>(
        &'a self,
        id: &'a str,
        params: Option<ExecResizeLibpod>,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>> { ... }
    fn exec_start_libpod<'a>(
        &'a self,
        id: &'a str,
        control: ExecStartLibpodBody,
    ) -> Pin<Box<dyn Future<Output = Result<TokioIo<Upgraded>, Error>> + Send + 'a>> { ... }
}
Available on crate feature v5 only.

Provided Methods§

Source

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

POST /libpod/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_libpod<'a>( &'a self, id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>>

GET /libpod/exec/{id}/json

Inspect an exec instance

Return low-level information about an exec instance.

Source

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

POST /libpod/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_libpod<'a>( &'a self, id: &'a str, control: ExecStartLibpodBody, ) -> Pin<Box<dyn Future<Output = Result<TokioIo<Upgraded>, Error>> + Send + 'a>>

POST /libpod/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. The stream format is the same as the attach endpoint.

Implementors§