Documentation ¶
Index ¶
- type DockerApiClient
- type DockerClient
- func (client DockerClient) ContainerCreate(ctx context.Context, imageName, containerName string) (string, error)
- func (client DockerClient) ContainerGetByID(ctx context.Context, id string) (*dockerTypes.Container, error)
- func (client DockerClient) ContainerGetByName(ctx context.Context, name string) (*dockerTypes.Container, error)
- func (client DockerClient) ContainerList(ctx context.Context) ([]dockerTypes.Container, error)
- func (client DockerClient) ContainerRemove(ctx context.Context, id string) error
- func (client DockerClient) ImageDelete(ctx context.Context, imageName string) error
- func (client DockerClient) ImageExists(ctx context.Context, imageName string) (bool, error)
- func (client DockerClient) ImageFind(ctx context.Context, imageName string) (id *string, err error)
- func (client DockerClient) ImagePull(ctx context.Context, imageName string) error
- type DockerClientConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DockerApiClient ¶
type DockerApiClient interface { docker.ContainerAPIClient docker.ImageAPIClient HTTPClient() *http.Client }
type DockerClient ¶
type DockerClient struct {
DockerApi DockerApiClient
}
func Client ¶
func Client() (*DockerClient, error)
func ClientFromConfig ¶
func ClientFromConfig(config DockerClientConfig) (*DockerClient, error)
func (DockerClient) ContainerCreate ¶
func (client DockerClient) ContainerCreate(ctx context.Context, imageName, containerName string) (string, error)
ContainerCreate - create a container given an image name
func (DockerClient) ContainerGetByID ¶
func (client DockerClient) ContainerGetByID(ctx context.Context, id string) (*dockerTypes.Container, error)
ContainerGetByID - return a container instance for a given id
func (DockerClient) ContainerGetByName ¶
func (client DockerClient) ContainerGetByName(ctx context.Context, name string) (*dockerTypes.Container, error)
ContainerGetByName - return a container instance for a given name
func (DockerClient) ContainerList ¶
func (client DockerClient) ContainerList(ctx context.Context) ([]dockerTypes.Container, error)
ContainerList - returns a list of all running containers
func (DockerClient) ContainerRemove ¶
func (client DockerClient) ContainerRemove(ctx context.Context, id string) error
func (DockerClient) ImageDelete ¶
func (client DockerClient) ImageDelete(ctx context.Context, imageName string) error
func (DockerClient) ImageExists ¶
type DockerClientConfig ¶
type DockerClientConfig struct {
Version string
}
Click to show internal directories.
Click to hide internal directories.