dockertest

package
v0.0.0-...-0391e5f Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DockerLab

type DockerLab struct {
	// contains filtered or unexported fields
}

DockerLab is an mlab container running Docker

func New

func New(tb testing.TB, ver string, log func(string)) (*DockerLab, error)

New creates a new DockerLab object it starts a DockerLab of the specified version, and allows processes to connect to it

if tb is not null the DockerLab object is related to this testing object: logs will be sent to it, and New either succeeds or fails the test with Fatal, so errors don't need to be tested.

log is optional function to log stderr/stdout, can be nil and then default are used (either tb.Log or stdout)

func (*DockerLab) Close

func (p *DockerLab) Close() error

Close mlab

func (*DockerLab) GetAddressPort

func (p *DockerLab) GetAddressPort() (net.IP, int, error)

GetAddressPort return the address and port used to access the Docker

func (*DockerLab) IP

func (p *DockerLab) IP() (net.IP, error)

IP return the internal IP address of docker

func (*DockerLab) Log

func (p *DockerLab) Log(format string, a ...interface{})

Log a string

Jump to

Keyboard shortcuts

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