docker

package
v0.0.0-...-fd2add7 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2016 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Hostname        string
	Domainname      string
	User            string
	Memory          int64  // Memory limit (in bytes)
	MemorySwap      int64  // Total memory usage (memory + swap); set `-1' to disable swap
	CpuShares       int64  // CPU shares (relative weight vs. other containers)
	Cpuset          string // Cpuset 0-2, 0,1
	AttachStdin     bool
	AttachStdout    bool
	AttachStderr    bool
	PortSpecs       []string // Deprecated - Can be in the format of 8080/tcp
	ExposedPorts    map[Port]struct{}
	Tty             bool // Attach standard streams to a tty, including stdin if it is not closed.
	OpenStdin       bool // Open stdin
	StdinOnce       bool // If true, close stdin after the 1 attached client disconnects.
	Env             []string
	Cmd             []string
	Image           string // Name of the image as it was passed by the operator (eg. could be symbolic)
	Volumes         map[string]struct{}
	WorkingDir      string
	Entrypoint      []string
	NetworkDisabled bool
	OnBuild         []string
}

type Container

type Container interface {
	Scrub()
	IsDone() bool
	Peek() (*Stat, error)
	Signal(sig string) error
	Wait() (*Stat, error)
	Stdin() io.WriteCloser
	Stdout() io.ReadCloser
	Stderr() io.ReadCloser
}

type HostConfig

type HostConfig struct {
	Binds           []string
	ContainerIDFile string
	LxcConf         []KeyValuePair
	Privileged      bool
	PortBindings    PortMap
	Links           []string
	PublishAllPorts bool
	Dns             []string
	DnsSearch       []string
	VolumesFrom     []string
	NetworkMode     NetworkMode
}

type KeyValuePair

type KeyValuePair struct {
	Key   string
	Value string
}

type NetworkMode

type NetworkMode string

type NetworkSettings

type NetworkSettings struct {
	IPAddress   string
	IPPrefixLen int
	Gateway     string
	Bridge      string
	PortMapping map[string]PortMapping // Deprecated
	Ports       PortMap
}

type Port

type Port string

type PortBinding

type PortBinding struct {
	HostIp   string
	HostPort string
}

type PortMap

type PortMap map[Port][]PortBinding

type PortMapping

type PortMapping map[string]string // Deprecated

type PortSet

type PortSet map[Port]struct{}

type Run

type Run struct {
	Image     string
	Memory    int64
	CpuShares int64
	Lxc       []string
	Volume    []string
	Dir       string
	Entry     string
	Env       []string
	Path      string
	Args      []string
	Scrub     bool
}

Run parameterizes a container execution.

func ParseRun

func ParseRun(src string) (*Run, error)

func (*Run) Arg

func (x *Run) Arg(name string) []string

func (*Run) String

func (x *Run) String() string

func (*Run) Volumes

func (x *Run) Volumes() map[string]struct{}

type Stat

type Stat struct {
	ID              string
	Created         time.Time
	Path            string
	Args            []string
	Config          Config
	State           State
	Image           string
	NetworkSettings NetworkSettings
	ResolvConfPath  string
	HostnamePath    string
	HostsPath       string
	Name            string
	Driver          string
	ExecDriver      string
	Volumes         map[string]string
	VolumesRW       map[string]bool
	HostConfig      HostConfig
}

func ParseStat

func ParseStat(buf []byte) (s *Stat, err error)

func ParseStatInArray

func ParseStatInArray(buf []byte) (s *Stat, err error)

func (Stat) String

func (s Stat) String() string

type State

type State struct {
	Running    bool
	Paused     bool
	Pid        int
	ExitCode   int
	StartedAt  time.Time
	FinishedAt time.Time
	Ghost      bool
}

Jump to

Keyboard shortcuts

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