Trait ContainersCompat

Source
pub trait ContainersCompat:
    HasConfig
    + Send
    + Sync {
Show 23 methods // Provided methods fn image_commit<'a>( &'a self, params: Option<ImageCommit<'a>>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>> { ... } fn container_delete<'a>( &'a self, name: &'a str, params: Option<ContainerDelete>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>> { ... } fn container_archive<'a>( &'a self, name: &'a str, params: Option<ContainerArchive<'a>>, ) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'a>> { ... } fn put_container_archive<'a>( &'a self, name: &'a str, params: Option<PutContainerArchive<'a>>, request: String, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>> { ... } fn container_attach<'a>( &'a self, name: &'a str, params: Option<ContainerAttach<'a>>, ) -> Pin<Box<dyn Future<Output = Result<TokioIo<Upgraded>, Error>> + Send + 'a>> { ... } fn container_export<'a>( &'a self, name: &'a str, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>> { ... } fn container_inspect<'a>( &'a self, name: &'a str, params: Option<ContainerInspect>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>> { ... } fn container_kill<'a>( &'a self, name: &'a str, params: Option<ContainerKill<'a>>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>> { ... } fn container_logs<'a>( &'a self, name: &'a str, params: Option<ContainerLogs<'a>>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>> { ... } fn container_pause<'a>( &'a self, name: &'a str, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>> { ... } fn container_rename<'a>( &'a self, name: &'a str, params: Option<ContainerRename<'a>>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>> { ... } fn container_resize<'a>( &'a self, name: &'a str, params: Option<ContainerResize>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>> { ... } fn container_restart<'a>( &'a self, name: &'a str, params: Option<ContainerRestart>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>> { ... } fn container_start<'a>( &'a self, name: &'a str, params: Option<ContainerStart<'a>>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>> { ... } fn container_stats<'a>( &'a self, name: &'a str, params: Option<ContainerStats>, ) -> Pin<Box<dyn Future<Output = Result<Value, Error>> + Send + 'a>> { ... } fn container_stop<'a>( &'a self, name: &'a str, params: Option<ContainerStop>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>> { ... } fn container_top<'a>( &'a self, name: &'a str, params: Option<ContainerTop<'a>>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>> { ... } fn container_unpause<'a>( &'a self, name: &'a str, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>> { ... } fn container_wait<'a>( &'a self, name: &'a str, params: Option<ContainerWait<'a>>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>> { ... } fn container_create<'a>( &'a self, params: Option<ContainerCreate<'a>>, body: (), ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>> { ... } fn container_list<'a>( &'a self, params: Option<ContainerList<'a>>, ) -> Pin<Box<dyn Future<Output = Result<Vec<()>, Error>> + Send + 'a>> { ... } fn container_prune<'a>( &'a self, params: Option<ContainerPrune<'a>>, ) -> Pin<Box<dyn Future<Output = Result<Vec<()>, Error>> + Send + 'a>> { ... } fn container_archive_libpod<'a>( &'a self, name: &'a str, params: Option<ContainerArchiveLibpod<'a>>, ) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'a>> { ... }
}
Available on crate feature v4 only.

Provided Methods§

Source

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

POST /commit

New Image

Create a new image from a container

Source

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

DELETE /containers/{name}

Remove a container

Source

fn container_archive<'a>( &'a self, name: &'a str, params: Option<ContainerArchive<'a>>, ) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'a>>

GET /containers/{name}/archive

Get files from a container

Get a tar archive of files from a container

Source

fn put_container_archive<'a>( &'a self, name: &'a str, params: Option<PutContainerArchive<'a>>, request: String, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>>

GET /containers/{name}/archive

Put files into a container

Put a tar archive of files into a container

Source

fn container_attach<'a>( &'a self, name: &'a str, params: Option<ContainerAttach<'a>>, ) -> Pin<Box<dyn Future<Output = Result<TokioIo<Upgraded>, Error>> + Send + 'a>>

POST /containers/{name}/attach

Attach to a container

Attach to a container to read its output or send it input. You can attach to the same container multiple times and you can reattach to containers that have been detached.

It uses the same stream format as docker, see the libpod attach endpoint for a description of the format.

Source

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

GET /containers/{name}/export

Export a container

Export the contents of a container as a tarball.

Source

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

GET /containers/{name}/json

Inspect container

Return low-level information about a container.

Source

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

POST /containers/{name}/kill

Kill container

Signal to send to the container as an integer or string (e.g. SIGINT)

Source

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

GET /containers/{name}/logs

Get container logs

Get stdout and stderr logs from a container.

Source

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

POST /containers/{name}/pause

Pause container

Use the cgroups freezer to suspend all processes in a container.

Source

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

POST /containers/{name}/rename

Rename an existing container

Change the name of an existing container.

Source

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

POST /containers/{name}/resize

Resize a container’s TTY

Resize the terminal attached to a container (for use with Attach).

Source

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

POST /containers/{name}/restart

Restart container

Source

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

POST /containers/{name}/start

Start a container

Source

fn container_stats<'a>( &'a self, name: &'a str, params: Option<ContainerStats>, ) -> Pin<Box<dyn Future<Output = Result<Value, Error>> + Send + 'a>>

GET /containers/{name}/stats

Get stats for a container

This returns a live stream of a container’s resource usage statistics.

Source

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

POST /containers/{name}/stop

Stop a container

Source

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

GET /containers/{name}/top

List processes running inside a container

Source

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

POST /containers/{name}/unpause

Unpause container

Resume a paused container

Source

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

POST /containers/{name}/wait

Wait on a container

Block until a container stops or given condition is met.

Source

fn container_create<'a>( &'a self, params: Option<ContainerCreate<'a>>, body: (), ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>>

POST /containers/create

Create a container

Source

fn container_list<'a>( &'a self, params: Option<ContainerList<'a>>, ) -> Pin<Box<dyn Future<Output = Result<Vec<()>, Error>> + Send + 'a>>

GET /containers/json

List containers

Returns a list of containers

Source

fn container_prune<'a>( &'a self, params: Option<ContainerPrune<'a>>, ) -> Pin<Box<dyn Future<Output = Result<Vec<()>, Error>> + Send + 'a>>

POST /containers/prune

Delete stopped containers

Remove containers not in use

Source

fn container_archive_libpod<'a>( &'a self, name: &'a str, params: Option<ContainerArchiveLibpod<'a>>, ) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'a>>

GET /libpod/containers/{name}/archive

Copy files from a container

Copy a tar archive of files from a container

Implementors§