container

package
v1.4.2-0...-89ce420 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(t *testing.T, ctx context.Context, client client.APIClient, ops ...func(*TestContainerConfig)) string

Create creates a container with the specified options

func Run

func Run(t *testing.T, ctx context.Context, client client.APIClient, ops ...func(*TestContainerConfig)) string

Run creates and start a container with the specified options

func WithCmd

func WithCmd(cmds ...string) func(*TestContainerConfig)

WithCmd sets the comannds of the container

func WithExposedPorts

func WithExposedPorts(ports ...string) func(*TestContainerConfig)

WithExposedPorts sets the exposed ports of the container

func WithLinks(links ...string) func(*TestContainerConfig)

WithLinks sets the links of the container

func WithName

func WithName(name string) func(*TestContainerConfig)

WithName sets the name of the container

func WithNetworkMode

func WithNetworkMode(mode string) func(*TestContainerConfig)

WithNetworkMode sets the network mode of the container

func WithTty

func WithTty(tty bool) func(*TestContainerConfig)

WithTty sets the TTY mode of the container

func WithWorkingDir

func WithWorkingDir(dir string) func(*TestContainerConfig)

WithWorkingDir sets the working dir of the container

Types

type TestContainerConfig

type TestContainerConfig struct {
	Name             string
	Config           *container.Config
	HostConfig       *container.HostConfig
	NetworkingConfig *network.NetworkingConfig
}

TestContainerConfig holds container configuration struct that are used in api calls.

Jump to

Keyboard shortcuts

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