containers

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2020 License: MIT Imports: 6 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 {
	ID         string
	Host       string
	Name       string
	HostIP     string
	HostPort   string
	TCP        string
	Config     *container.Config
	CLI        *docker.Client
	CustomArgs map[string]interface{}
}

func (*Container) CreateContainer

func (c *Container) CreateContainer() *Container

func (*Container) DumpContainerLogs

func (c *Container) DumpContainerLogs()

DumpContainerLogs runs "docker logs" against the container and send it to t.Log TODO: tidy up

func (*Container) GetStatus

func (c *Container) GetStatus() ([]DockerInspect, error)

func (*Container) SetConfig

func (c *Container) SetConfig(config *container.Config)

func (*Container) SetContainerCLI

func (c *Container) SetContainerCLI(client *docker.Client)

func (*Container) SetContainerHost

func (c *Container) SetContainerHost(host string)

func (*Container) SetContainerHostIP

func (c *Container) SetContainerHostIP(hostIp string)

func (*Container) SetContainerHostPort

func (c *Container) SetContainerHostPort(hostPort string)

func (*Container) SetContainerID

func (c *Container) SetContainerID(id string)

func (*Container) SetContainerName

func (c *Container) SetContainerName(name string)

func (*Container) SetTCP

func (c *Container) SetTCP(tcp string)

func (*Container) StopContainer

func (c *Container) StopContainer()

StopContainer ...

type Docker

type Docker interface {
	SetContainerID(id string)
	SetContainerName(name string)
	SetContainerHost(host string)
	SetContainerHostIP(hostIp string)
	SetContainerHostPort(hostPort string)
	SetTCP(tcp string)
	SetConfig(config *container.Config)
	SetContainerCLI(client *docker.Client)
	CreateContainer() *Container
	StopContainer()
}

type DockerInspect

type DockerInspect struct {
	State struct {
		Status string `json:"Status"`
	} `json:"State"`
	NetworkSettings struct {
		Networks struct {
			Bridge struct {
				IPAddress string `json:"IPAddress"`
			} `json:"bridge"`
		} `json:"Networks"`
	} `json:"NetworkSettings"`
}

DockerInspect Values resulting from the command `docker inspect container-name`

Jump to

Keyboard shortcuts

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