docker

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	ImagePull(ctx context.Context, refStr string, options types.ImagePullOptions) (io.ReadCloser, error)
	ContainerCreate(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, containerName string) (container.ContainerCreateCreatedBody, error)
	ContainerStart(ctx context.Context, containerID string, options types.ContainerStartOptions) error
	ContainerStop(ctx context.Context, container string, timeout *time.Duration) error
	ContainerRemove(ctx context.Context, container string, options types.ContainerRemoveOptions) error
}

Client is our interface for the docker client to define what we use and to mock it.

func NewClient

func NewClient() (Client, error)

type Container

type Container interface {
	ID() string
	Name() string
	Start() error
	Stop() error
	Restart() error
}

Container is a handle over a docker container to manage the lifecycle of a service.

type Docker

type Docker interface {
	EnsureImage(image string) error
	StartContainer() (Container, error)
}

Docker is a interface over our abstraction over docker

Jump to

Keyboard shortcuts

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