compose

package
v0.0.0-...-c381765 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2017 License: MIT Imports: 12 Imported by: 2

Documentation

Index

Constants

View Source
const ContainerNotFound string = "container id not found"

ContainerNotFound error message when container id cannot be found with image name

View Source
const ContainerRunFailed string = "container id failed to run"

ContainerRunFailed error message when container failed to run

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	Engine Engine
}

Container is the base container system

type Docker

type Docker struct {
	Client *client.Client
}

Docker is the implementation of the Docker container engine

func (Docker) ActiveContainers

func (engine Docker) ActiveContainers() (int, error)

ActiveContainers returns the list of running docker containers

func (Docker) PullImage

func (engine Docker) PullImage(image string) (string, error)

PullImage will pull down the image specified

func (Docker) RunContainer

func (engine Docker) RunContainer(message string, image string) error

RunContainer will run a docker container

type Engine

type Engine interface {
	ActiveContainers() (int, error)
	PullImage(image string) (string, error)
	RunContainer(message string, image string) error
	// contains filtered or unexported methods
}

Engine is the interface to implement container systems

Jump to

Keyboard shortcuts

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