Documentation ¶
Index ¶
- func Download(image, tag string) error
- func InspectContainer(name string) (*docker.Container, error)
- func IsDownloaded(image, tag string) bool
- func IsRunning(name string) bool
- func ListContainers(all bool) ([]docker.APIContainers, error)
- func ListRunning(filter string) ([]string, error)
- func RemoveContainer(name string) error
- func RemoveImage(name string) error
- func Start(image, tag string, config *Config) error
- func Stop(name string, timeout uint) error
- type Config
- type ContainerManager
- type Port
- type Volume
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsDownloaded ¶
func ListContainers ¶
func ListContainers(all bool) ([]docker.APIContainers, error)
func ListRunning ¶
func RemoveContainer ¶
func RemoveImage ¶
Types ¶
type Config ¶
type Config struct { Image string Command []string // Defaults to unlimited. Memory int // Defaults to unlimited. CPU int Ports []Port Volumes []Volume }
Container Related Config Could be abstracted into an interface or moved to the docker class
type ContainerManager ¶
type ContainerManager interface { Start(image, tag string, config *Config) error Stop(name string, timeout uint) error Download(image, tag string) error IsDownloaded(image, tag string) bool ListRunning(filter string) ([]string, error) ListContainers(all bool) ([]docker.APIContainers, error) IsRunning(name string) bool RemoveContainer(name string) error RemoveImage(name string) error InspectContainer(name string) (*docker.Container, error) }
Manager abstracts the container interface
Click to show internal directories.
Click to hide internal directories.