Documentation ¶
Index ¶
- type MockDockerClient
- func (m *MockDockerClient) AddPod(podID pod.ID, container string, pid int)
- func (m *MockDockerClient) Connect()
- func (m *MockDockerClient) DelPod(podID pod.ID)
- func (m *MockDockerClient) Disconnect()
- func (m *MockDockerClient) InspectContainer(id string) (*docker.Container, error)
- func (m *MockDockerClient) ListContainers(opts docker.ListContainersOptions) (containers []docker.APIContainers, err error)
- func (m *MockDockerClient) Ping() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockDockerClient ¶
type MockDockerClient struct {
// contains filtered or unexported fields
}
MockDockerClient is a mock for Docker client.
func NewMockDockerClient ¶
func NewMockDockerClient() *MockDockerClient
NewMockDockerClient is a constructor for MockDockerClient.
func (*MockDockerClient) AddPod ¶
func (m *MockDockerClient) AddPod(podID pod.ID, container string, pid int)
AddPod simulates creation of a pod.
func (*MockDockerClient) Connect ¶
func (m *MockDockerClient) Connect()
Connect puts the mock Docker client into the connected state.
func (*MockDockerClient) DelPod ¶
func (m *MockDockerClient) DelPod(podID pod.ID)
DelPod simulates removal of a pod.
func (*MockDockerClient) Disconnect ¶
func (m *MockDockerClient) Disconnect()
Disconnect puts the mock Docker client into the disconnected state.
func (*MockDockerClient) InspectContainer ¶
func (m *MockDockerClient) InspectContainer(id string) (*docker.Container, error)
InspectContainer returns information about a container by its ID.
func (*MockDockerClient) ListContainers ¶
func (m *MockDockerClient) ListContainers(opts docker.ListContainersOptions) (containers []docker.APIContainers, err error)
ListContainers returns a slice of containers matching the given criteria.
func (*MockDockerClient) Ping ¶
func (m *MockDockerClient) Ping() error
Ping pings the docker server.
Click to show internal directories.
Click to hide internal directories.