Versions in this module Expand all Collapse all v0 v0.1.1 Dec 4, 2019 Changes in this version + func HostAddr(port int) string + func HostIP() (string, error) — darwin/amd64, linux/amd64 + type BuildImageConfig struct + Path string + Tag string + type Container interface + GetState func(context.Context) (*types.ContainerState, error) + Logs func(context.Context) (io.Reader, error) + Name func() string + Start func(context.Context) error + Stop func(context.Context) error + type ContainerConfig struct + AttachIfExist bool + AutoRemove bool + CapAdd []string + Cmd []string + EntryPoint []string + Env []string + Healtcheck *HealthCheckConfig + Hostname string + Image string + Labels map[string]string + Mounts Mounts + Name string + NetworkName string + PortMap PortMap + Privileged bool + PublishAllPorts bool + WaitPolicy WaitPolicy + type ContainerPort int + type ContainerType struct + ID string + WaitPolicy WaitPolicy + func (c *ContainerType) GetState(ctx context.Context) (*types.ContainerState, error) + func (c *ContainerType) GetStateV2(ctx context.Context) (*types.ContainerState, error) + func (c *ContainerType) Logs(ctx context.Context) (io.Reader, error) + func (c *ContainerType) Name() string + func (c *ContainerType) Start(ctx context.Context) error + func (c *ContainerType) Stop(ctx context.Context) error + func (c *ContainerType) WaitForReady(ctx context.Context) (state *types.ContainerState, err error) + func (c *ContainerType) WaitForStatusHealthly(ctx context.Context) (state *types.ContainerState, err error) + type Docker struct + func New() (*Docker, error) + func (c *Docker) BuildImage(path, tag string) error + func (c *Docker) CreateNetwork(name string) (*Network, error) + func (c *Docker) ImagePull(ctx context.Context, image string) error + func (c *Docker) NewContainer(config ContainerConfig) (*ContainerType, error) + func (c *Docker) PullImage(ref string) error + func (c *Docker) PullImageIfNotExist(ctx context.Context, image string) error + func (c *Docker) RemoveContainer(ctx context.Context, id string) error + func (c Docker) ContainerExists(ctx context.Context, containerID string) bool + func (c Docker) ImageExists(ctx context.Context, image string) bool + type HealthCheckConfig struct + Interval time.Duration + Retries int + Test []string + Timeout time.Duration + type HostPort int + type Mount struct + Source string + Target string + type Mounts []Mount + type MultiWaitPolicy struct + WaitPolicies []WaitForIt + func (w *MultiWaitPolicy) WaitForIt(ctx context.Context, c *ContainerType) error + type Network struct + ID string + func NewNetwork(client *Docker, config NetworkConfig) (*Network, error) + func (n *Network) Close() error + func (n *Network) Remove() error + type NetworkConfig struct + AttachIfExist bool + Labels map[string]string + Name string + type PortMap map[ContainerPort]HostPort + type PullImageConfig struct + Ref string + type State struct + ExitCode int + Status string + type WaitForCommand struct + Command string + func (w *WaitForCommand) WaitForIt(ctx context.Context, c *ContainerType) error + type WaitForIt interface + WaitForIt func(context.Context, *ContainerType) error + type WaitForPort struct + Port int + func (w *WaitForPort) WaitForIt(ctx context.Context, c *ContainerType) error + type WaitForProcess struct + Process string + func (w *WaitForProcess) WaitForIt(ctx context.Context, c *ContainerType) error + type WaitPolicy interface + WaitForIt func(context.Context, *ContainerType) error + type WaitWithDeley struct + Deley time.Duration + func (w *WaitWithDeley) WaitForIt(ctx context.Context, c *ContainerType) error