MCPcopy Create free account
hub / github.com/Mirantis/cri-dockerd / DockerClientInterface

Interface DockerClientInterface

libdocker/client.go:61–91  ·  view source on GitHub ↗

DockerClientInterface is an abstract interface for testability. It abstracts the interface of docker client.

Source from the content-addressed store, hash-verified

59
60// DockerClientInterface is an abstract interface for testability. It abstracts the interface of docker client.
61type DockerClientInterface interface {
62 ListContainers(options dockercontainer.ListOptions) ([]dockertypes.Container, error)
63 InspectContainer(id string) (*dockertypes.ContainerJSON, error)
64 InspectContainerWithSize(id string) (*dockertypes.ContainerJSON, error)
65 CreateContainer(
66 createConfig ContainerCreateConfig,
67 ) (*dockercontainer.CreateResponse, error)
68 StartContainer(id string) error
69 StopContainer(id string, timeout time.Duration) error
70 UpdateContainerResources(id string, updateConfig dockercontainer.UpdateConfig) error
71 RemoveContainer(id string, opts dockercontainer.RemoveOptions) error
72 InspectImageByRef(imageRef string) (*dockertypes.ImageInspect, error)
73 InspectImageByID(imageID string) (*dockertypes.ImageInspect, error)
74 ListImages(opts dockertypes.ImageListOptions) ([]dockerimagetypes.Summary, error)
75 PullImage(image string, auth dockerregistry.AuthConfig, opts dockertypes.ImagePullOptions) error
76 RemoveImage(
77 imageName string,
78 opts dockertypes.ImageRemoveOptions,
79 ) ([]dockerimagetypes.DeleteResponse, error)
80 ImageHistory(id string) ([]dockerimagetypes.HistoryResponseItem, error)
81 Logs(string, dockercontainer.LogsOptions, StreamOptions) error
82 Version() (*dockertypes.Version, error)
83 Info() (*dockersystem.Info, error)
84 CreateExec(string, dockertypes.ExecConfig) (*dockertypes.IDResponse, error)
85 StartExec(string, dockertypes.ExecStartCheck, StreamOptions) error
86 InspectExec(id string) (*dockertypes.ContainerExecInspect, error)
87 AttachToContainer(string, dockercontainer.AttachOptions, StreamOptions) error
88 ResizeContainerTTY(id string, height, width uint) error
89 ResizeExecTTY(id string, height, width uint) error
90 GetContainerStats(id string) (*dockertypes.StatsJSON, error)
91}
92
93// Get a *dockerapi.Client, either using the endpoint passed in, or using
94// DOCKER_HOST, DOCKER_TLS_VERIFY, and DOCKER_CERT path per their spec

Callers 100

TestListContainersFunction · 0.65
ListContainersMethod · 0.65
ListPodSandboxMethod · 0.65
RemovePodSandboxMethod · 0.65
ListContainersMethod · 0.65
GetContainerLogsMethod · 0.65
getContainerLogPathMethod · 0.65
TestSandboxStatusFunction · 0.65
getPodSandboxDetailsMethod · 0.65
TestContainerStatusFunction · 0.65

Implementers 5

instrumentedInterfacelibdocker/instrumented_client.go
kubeDockerClientlibdocker/kube_docker_client.go
FakeDockerClientlibdocker/fake_client.go
MockDockerClientInterfacelibdocker/testing/mock_client.go
MockDockerClientInterfaceMockRecorderlibdocker/testing/mock_client.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…