/
interface.go
29 lines (26 loc) · 1015 Bytes
/
interface.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package dockerclient
import (
"io"
)
type Callback func(*Event, chan error, ...interface{})
type Client interface {
Info() (*Info, error)
ListContainers(all, size bool, filters string) ([]Container, error)
InspectContainer(id string) (*ContainerInfo, error)
CreateContainer(config *ContainerConfig, name string) (string, error)
ContainerLogs(id string, options *LogOptions) (io.ReadCloser, error)
Exec(config *ExecConfig) (string, error)
StartContainer(id string, config *HostConfig) error
StopContainer(id string, timeout int) error
RestartContainer(id string, timeout int) error
KillContainer(id, signal string) error
StartMonitorEvents(cb Callback, ec chan error, args ...interface{})
StopAllMonitorEvents()
Version() (*Version, error)
PullImage(name string, auth *AuthConfig) error
RemoveContainer(id string, force, volumes bool) error
ListImages() ([]*Image, error)
RemoveImage(name string) ([]*ImageDelete, error)
PauseContainer(name string) error
UnpauseContainer(name string) error
}