Documentation ¶
Index ¶
- Variables
- func CreateContainer(conf CreateConfig) (*dc.Container, error)
- func CreateExec(id string, cmd []string, in, out, err bool) (*dc.Exec, error)
- func ExecInContainer(container string, args ...string) ([]byte, error)
- func GetContainer(id string) (*dc.Container, error)
- func ImageExists(image string) bool
- func InspectContainer(id string) (*dc.Container, error)
- func InstallImage(image string) error
- func KillContainer(id, sig string) error
- func ListContainers(labels ...string) ([]*dc.Container, error)
- func ListImages() ([]dc.APIImages, error)
- func RemoveContainer(id string) error
- func ResizeContainerTTY(id string, height, width int) error
- func ResizeExecTTY(id string, height, width int) error
- func RunExec(exec *dc.Exec, in io.Reader, out io.Writer, err io.Writer) (*dc.ExecInspect, error)
- func StartContainer(id string) error
- func WaitContainer(id string) (int, error)
- type ClientInterface
- type CreateConfig
- type DockerDefault
- type DockerUtil
- func (d DockerUtil) CreateContainer(conf CreateConfig) (*dc.Container, error)
- func (d DockerUtil) CreateExec(id string, cmd []string, in, out, err bool) (*dc.Exec, error)
- func (d DockerUtil) ExecInContainer(container string, args ...string) ([]byte, error)
- func (d DockerUtil) GetContainer(id string) (*dc.Container, error)
- func (d DockerUtil) ImageExists(name string) bool
- func (d DockerUtil) InspectContainer(id string) (*dc.Container, error)
- func (d DockerUtil) InstallImage(image string) error
- func (d DockerUtil) KillContainer(id, sig string) error
- func (d DockerUtil) ListContainers(labels ...string) ([]*dc.Container, error)
- func (d DockerUtil) ListImages() ([]dc.APIImages, error)
- func (d DockerUtil) RemoveContainer(id string) error
- func (d DockerUtil) ResizeContainerTTY(id string, height, width int) error
- func (d DockerUtil) ResizeExecTTY(id string, height, width int) error
- func (d DockerUtil) RunExec(exec *dc.Exec, in io.Reader, out io.Writer, err io.Writer) (*dc.ExecInspect, error)
- func (d DockerUtil) StartContainer(id string) error
- func (d DockerUtil) WaitContainer(id string) (int, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var LibDirs = []string{}
View Source
var WorkingDir = ""
Functions ¶
func CreateContainer ¶
func CreateContainer(conf CreateConfig) (*dc.Container, error)
func ImageExists ¶
func InstallImage ¶
func KillContainer ¶
func ListImages ¶
func RemoveContainer ¶
func ResizeContainerTTY ¶
func ResizeExecTTY ¶
func StartContainer ¶
func WaitContainer ¶
Types ¶
type ClientInterface ¶
type ClientInterface interface { ListImages(opts dc.ListImagesOptions) ([]dc.APIImages, error) PullImage(opts dc.PullImageOptions, auth dc.AuthConfiguration) error CreateContainer(opts dc.CreateContainerOptions) (*dc.Container, error) StartContainer(id string, hostConfig *dc.HostConfig) error KillContainer(opts dc.KillContainerOptions) error ResizeContainerTTY(id string, height, width int) error StopContainer(id string, timeout uint) error RemoveContainer(opts dc.RemoveContainerOptions) error WaitContainer(id string) (int, error) InspectContainer(id string) (*dc.Container, error) ListContainers(opts dc.ListContainersOptions) ([]dc.APIContainers, error) CreateExec(opts dc.CreateExecOptions) (*dc.Exec, error) ResizeExecTTY(id string, height, width int) error StartExec(id string, opts dc.StartExecOptions) error InspectExec(id string) (*dc.ExecInspect, error) }
var Client ClientInterface
type CreateConfig ¶
type DockerDefault ¶
type DockerDefault interface { CreateContainer(conf CreateConfig) (*dc.Container, error) StartContainer(id string) error KillContainer(id, sig string) error ResizeContainerTTY(id string, height, width int) error WaitContainer(id string) (int, error) RemoveContainer(id string) error InspectContainer(id string) (*dc.Container, error) GetContainer(id string) (*dc.Container, error) ListContainers(labels ...string) ([]*dc.Container, error) InstallImage(image string) error ListImages() ([]dc.APIImages, error) ImageExists(name string) bool ExecInContainer(container string, args ...string) ([]byte, error) CreateExec(id string, cmd []string, in, out, err bool) (*dc.Exec, error) ResizeExecTTY(id string, height, width int) error RunExec(exec *dc.Exec, in io.Reader, out io.Writer, err io.Writer) (*dc.ExecInspect, error) }
var Default DockerDefault
type DockerUtil ¶
type DockerUtil struct { }
func (DockerUtil) CreateContainer ¶
func (d DockerUtil) CreateContainer(conf CreateConfig) (*dc.Container, error)
func (DockerUtil) CreateExec ¶
create a new exec object in docker this new exec object can then be ran.
func (DockerUtil) ExecInContainer ¶
func (d DockerUtil) ExecInContainer(container string, args ...string) ([]byte, error)
Exec
func (DockerUtil) GetContainer ¶
func (d DockerUtil) GetContainer(id string) (*dc.Container, error)
GetContainer
func (DockerUtil) ImageExists ¶
func (d DockerUtil) ImageExists(name string) bool
func (DockerUtil) InspectContainer ¶
func (d DockerUtil) InspectContainer(id string) (*dc.Container, error)
InspectContainer
func (DockerUtil) InstallImage ¶
func (d DockerUtil) InstallImage(image string) error
func (DockerUtil) KillContainer ¶
func (d DockerUtil) KillContainer(id, sig string) error
func (DockerUtil) ListContainers ¶
func (d DockerUtil) ListContainers(labels ...string) ([]*dc.Container, error)
ListContainers
func (DockerUtil) ListImages ¶
func (d DockerUtil) ListImages() ([]dc.APIImages, error)
func (DockerUtil) RemoveContainer ¶
func (d DockerUtil) RemoveContainer(id string) error
RemoveContainer
func (DockerUtil) ResizeContainerTTY ¶
func (d DockerUtil) ResizeContainerTTY(id string, height, width int) error
func (DockerUtil) ResizeExecTTY ¶
func (d DockerUtil) ResizeExecTTY(id string, height, width int) error
resize the exec.
func (DockerUtil) RunExec ¶
func (d DockerUtil) RunExec(exec *dc.Exec, in io.Reader, out io.Writer, err io.Writer) (*dc.ExecInspect, error)
Start the exec. This will hang until the exec exits.
func (DockerUtil) WaitContainer ¶
func (d DockerUtil) WaitContainer(id string) (int, error)
Click to show internal directories.
Click to hide internal directories.