auxillary

package
Version: v1.8.21 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2019 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DockerAuxillary

type DockerAuxillary interface {
	//EnsureImagePulled checks if the docker host contains an image and pulls it if it does not
	EnsureImagePulled(ctx context.Context, cli *client.Client, imageName string) error

	//GetContainerByName attempts to find a container with the given name and return information on it.
	GetContainerByName(ctx context.Context, cli *client.Client, containerName string) (types.Container, error)

	//GetNetworkByName attempts to find a network with the given name and return information on it.
	GetNetworkByName(ctx context.Context, cli *client.Client, networkName string) (types.NetworkResource, error)

	//GetVolumeByName attempts to find a volume with the given name and return information on it.
	GetVolumeByName(ctx context.Context, cli *client.Client, volumeName string) (*types.Volume, error)

	//HostHasImage returns true if the docker host has an image matching what was given
	HostHasImage(ctx context.Context, cli *client.Client, image string) (bool, error)
}

DockerAuxillary provides extra functions for docker service, which could be placed inside of docker service, but would make the testing more difficult

func NewDockerAuxillary

func NewDockerAuxillary(repo repository.DockerRepository) DockerAuxillary

NewDockerAuxillary creates a new DockerAuxillary instance

Source Files

Jump to

Keyboard shortcuts

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