Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CombineImageNameAndTag ¶
func IfVolumesDiffer ¶
Types ¶
type MountPoint ¶
type Mounts ¶
type Mounts []MountPoint
func (Mounts) ExtractSources ¶
ExtractSources returns a list of sources for the given mounts
type Operator ¶
type Operator interface { ImageIfExist(imageNameWithTag string) bool ImagePull(imageNameWithTag string) error ImageRemove(imageNameWithTag string) error ContainerIfExist(containerName string) bool ContainerIfRunning(containerName string) bool // ContainerRun runs a container with the given options // params is a list of additional parameters for docker run // params will be appended to the end of the command ContainerRun(opts *RunOptions) error ContainerStop(containerName string) error ContainerRemove(containerName string) error // ContainerListMounts lists container mounts ContainerListMounts(containerName string) (Mounts, error) ContainerGetHostname(containerName string) (string, error) ContainerListPortPublishes(containerName string) ([]PortPublish, error) ContainerGetPortBinding(containerName string, containerPort uint) (hostPort uint, err error) ComposeUp() error ComposeDown() error ComposeState() (map[string]interface{}, error) }
Operator is an interface for docker operations It is implemented by shDockerOperator in the future, we can add other implementations such as SdkDockerOperator
type PortPublish ¶
RunOptions is used to pass options to ContainerRunWithOptions
type RunOptions ¶
type RunOptions struct { ImageName string ImageTag string Hostname string ContainerName string PortPublishes []PortPublish Volumes Volumes RestartAlways bool RunParams []string }
RunOptions is used to pass options to ContainerRunWithOptions
func (*RunOptions) Validate ¶
func (opts *RunOptions) Validate() error
Click to show internal directories.
Click to hide internal directories.