containers

package
v3.8.9+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	Name     string
	IP       string
	Hostname string
	// contains filtered or unexported fields
}

func Run

func Run(namePrefix string, opts RunOpts, args ...string) (c *Container)

func (*Container) CanConnectTo

func (c *Container) CanConnectTo(ip, port, protocol string) bool

func (*Container) CopyFileIntoContainer

func (c *Container) CopyFileIntoContainer(hostPath, containerPath string) error

func (*Container) DockerInspect

func (c *Container) DockerInspect(format string) string

func (*Container) EnsureBinary

func (c *Container) EnsureBinary(name string)

func (*Container) Exec

func (c *Container) Exec(cmd ...string)

func (*Container) ExecMayFail

func (c *Container) ExecMayFail(cmd ...string) error

func (*Container) ExecOutput

func (c *Container) ExecOutput(args ...string) (string, error)

func (*Container) GetHostname

func (c *Container) GetHostname() string

func (*Container) GetIP

func (c *Container) GetIP() string

func (*Container) GetPIDs

func (c *Container) GetPIDs(processName string) []int

func (*Container) GetSinglePID

func (c *Container) GetSinglePID(processName string) int

func (*Container) ListedInDockerPS

func (c *Container) ListedInDockerPS() bool

func (*Container) Remove

func (c *Container) Remove()

Remove deletes a container. Should be manually called after a non-auto-removed container is stopped.

func (*Container) SourceName

func (c *Container) SourceName() string

func (*Container) Start

func (c *Container) Start()

Start executes "docker start" on a container. Useful when used after Stop() to restart a container.

func (*Container) Stop

func (c *Container) Stop()

func (*Container) Stopped

func (c *Container) Stopped() bool

func (*Container) WaitNotRunning

func (c *Container) WaitNotRunning(timeout time.Duration)

func (*Container) WaitUntilRunning

func (c *Container) WaitUntilRunning()

func (*Container) WatchStdoutFor

func (c *Container) WatchStdoutFor(re *regexp.Regexp) chan struct{}

type RunOpts

type RunOpts struct {
	AutoRemove bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL