container

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckForDocker added in v0.3.0

func CheckForDocker() error

Types

type ContainerInfo added in v0.1.2

type ContainerInfo struct {
	Id         string
	State      ContainerState
	RunCommand string
}

type ContainerInterface added in v0.1.2

type ContainerInterface interface {
	Start() error
	Remove() error
	Status() (*ContainerInfo, error)
	Exec(command ...string) (string, error)
	Logs() (string, error)
}

func New

func New(image string, env []v1.EnvVar, ports []v1.ServicePort, volumes []canaryv1.Volume, command []string, dockerRunOptions []string) ContainerInterface

type ContainerState added in v0.1.2

type ContainerState struct {
	Status  string
	Running bool
}

type DockerContainer added in v0.1.2

type DockerContainer struct {
	Name       string
	Id         string
	Image      string
	Command    []string
	Env        []v1.EnvVar
	Ports      []v1.ServicePort
	Volumes    []canaryv1.Volume
	RunOptions []string
	// contains filtered or unexported fields
}

func (DockerContainer) Exec added in v0.1.2

func (c DockerContainer) Exec(command ...string) (string, error)

Exec a command inside a container

func (DockerContainer) Logs added in v0.1.2

func (c DockerContainer) Logs() (string, error)

Get container logs

func (DockerContainer) Remove added in v0.1.2

func (c DockerContainer) Remove() error

Remove a container

func (*DockerContainer) Start added in v0.1.2

func (c *DockerContainer) Start() error

Start a container

func (DockerContainer) Status added in v0.1.2

func (c DockerContainer) Status() (*ContainerInfo, error)

Get container status

Jump to

Keyboard shortcuts

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