docker

package
v0.27.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTimeout = 2 * time.Second
)

Variables

This section is empty.

Functions

func DockerContainerToContainerData

func DockerContainerToContainerData(container *dockertypes.Container) *runtimeclient.ContainerData

func NewDockerClient

func NewDockerClient(socketPath string, protocol string) (runtimeclient.ContainerRuntimeClient, error)

Types

type DockerClient

type DockerClient struct {
	// contains filtered or unexported fields
}

DockerClient implements the ContainerRuntimeClient interface but using the Docker Engine API instead of the CRI plugin interface (Dockershim). It was necessary because Dockershim does not always use the same approach of CRI-O and containerd. For instance, Dockershim does not provide the container pid1 with the ContainerStatus() call as containerd and CRI-O do.

func (*DockerClient) Close

func (c *DockerClient) Close() error

func (*DockerClient) GetContainer

func (c *DockerClient) GetContainer(containerID string) (*runtimeclient.ContainerData, error)

func (*DockerClient) GetContainerDetails

func (c *DockerClient) GetContainerDetails(containerID string) (*runtimeclient.ContainerDetailsData, error)

func (*DockerClient) GetContainers

func (c *DockerClient) GetContainers() ([]*runtimeclient.ContainerData, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL