docker

package
v0.0.0-...-6371fb4 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2016 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dcontainer

type Dcontainer struct {
	ID          string
	Ctx         context.Context
	LogFd       *os.File
	HijackedRes types.HijackedResponse
	Cli         *client.Client
}

A Package wrapper for handling docker containers

func (*Dcontainer) Close

func (d *Dcontainer) Close(HijackRes bool)

func (*Dcontainer) GetStats

func (d *Dcontainer) GetStats() (typ.StatsInfo, error)

Getstats get the docker container stats and stores into StatsInfo

func (*Dcontainer) Kill

func (d *Dcontainer) Kill() error

Kill will kill the docker container using container id

func (*Dcontainer) Run

func (d *Dcontainer) Run(name, image string, cmd []string, mem int64, logFileName string) error

Run will PUll an image if its not available and start a container and attach to it It will also set the max memory limit of the image.

func (*Dcontainer) Wait

func (d *Dcontainer) Wait() int64

Jump to

Keyboard shortcuts

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