forked from gitlabhq/gitlab-runner
-
Notifications
You must be signed in to change notification settings - Fork 1
/
client.go
22 lines (18 loc) · 873 Bytes
/
client.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package docker_helpers
import "github.com/fsouza/go-dockerclient"
type Client interface {
InspectImage(name string) (*docker.Image, error)
PullImage(opts docker.PullImageOptions, auth docker.AuthConfiguration) error
ImportImage(opts docker.ImportImageOptions) error
CreateContainer(opts docker.CreateContainerOptions) (*docker.Container, error)
StartContainer(id string, hostConfig *docker.HostConfig) error
WaitContainer(id string) (int, error)
KillContainer(opts docker.KillContainerOptions) error
InspectContainer(id string) (*docker.Container, error)
AttachToContainer(opts docker.AttachToContainerOptions) error
RemoveContainer(opts docker.RemoveContainerOptions) error
DisconnectNetwork(id string, opts docker.NetworkConnectionOptions) error
ListNetworks() ([]docker.Network, error)
Logs(opts docker.LogsOptions) error
Info() (*docker.Env, error)
}