Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DockerCli ¶
DockerCli extends the docker.APIClient with IsContainerLive function in order to reduce the time to check if a container is live.
type DockerClient ¶
type DockerClient struct { *docker.Client LiveContainers []types.Container // Used to check if the given containers are live }
DockerClient extends the docker.Client with LiveContainers field, in order to reduce the time to check if a container is live.
func GetDockerClient ¶
func GetDockerClient(ctx context.Context) (*DockerClient, error)
GetDockerClient returns a pointer to new DockerClient, it fetches all the live containers on the creation of the client in order to reduce the time to check if a container is live.
func (*DockerClient) IsContainerLive ¶
func (dc *DockerClient) IsContainerLive(name string) bool
IsContainerLive checks if the container with given name is alive or dead
Click to show internal directories.
Click to hide internal directories.