docker

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2018 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultClient

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

DefaultClient that interfaces with docker SDK.

func NewDockerClient

func NewDockerClient(config *configuration.Configuration) *DefaultClient

Creates a new docker client to interact with the local Docker Engine.

func (*DefaultClient) CheckContainerStatus

func (client *DefaultClient) CheckContainerStatus(containerID string) (myContainer.ContainerStatus, error)

Check the container status (running, stopped, etc)

func (*DefaultClient) GetDockerCPUAndRAM

func (client *DefaultClient) GetDockerCPUAndRAM() (int, int)

Get CPUs and RAM dedicated to Docker engine (Decided by the user in Docker configuration).

func (*DefaultClient) RemoveContainer

func (client *DefaultClient) RemoveContainer(containerID string) error

Remove a container from the Docker engine (to avoid filling space in the node).

func (*DefaultClient) RunContainer

func (client *DefaultClient) RunContainer(imageKey string, portMappings []caravelaTypes.PortMapping,
	args []string, cpus int64, ram int) (string, error)

Launches a container from an image in the local Docker Engine.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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