Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DockerClient ¶
type DockerClient struct {
// contains filtered or unexported fields
}
DockerClient can get information from docker
func (DockerClient) ContainerKillByContainerID ¶
func (c DockerClient) ContainerKillByContainerID(ctx context.Context, containerID string) error
ContainerKillByContainerID kills container according to container id
func (DockerClient) FormatContainerID ¶
FormatContainerID strips protocol prefix from the container ID
func (DockerClient) GetPidFromContainerID ¶
func (c DockerClient) GetPidFromContainerID(ctx context.Context, containerID string) (uint32, error)
GetPidFromContainerID fetches PID according to container id
type DockerClientInterface ¶
type DockerClientInterface interface { ContainerInspect(ctx context.Context, containerID string) (types.ContainerJSON, error) ContainerKill(ctx context.Context, containerID, signal string) error }
DockerClientInterface represents the DockerClient, it's used to simply unit test
Click to show internal directories.
Click to hide internal directories.