Versions in this module Expand all Collapse all v0 v0.5.3 May 28, 2015 v0.5.2 May 19, 2015 v0.5.1 May 13, 2015 v0.4.4 Apr 23, 2015 Changes in this version + func Cgroupfs(l *LinuxFactory) error — linux/amd64 + func InitArgs(args ...string) func(*LinuxFactory) error — linux/amd64 + func InitPath(path string, args ...string) func(*LinuxFactory) error — linux/amd64 + func SystemdCgroups(l *LinuxFactory) error — linux/amd64 + func TmpfsRoot(l *LinuxFactory) error — linux/amd64 + type Console interface + Fd func() uintptr + Path func() string type Container + NotifyOOM func() (<-chan struct{}, error) + Set func(config configs.Config) error + State func() (*State, error) + Status func() (Status, error) type ErrorCode + const ContainerNotExists + const ContainerNotRunning + const ContainerNotStopped + const ProcessNotExecuted + func (c ErrorCode) String() string type Factory + func New(root string, options ...func(*LinuxFactory) error) (Factory, error) + StartInitialization func() error + Type func() string + type LinuxFactory struct — linux/amd64 + InitArgs []string + InitPath string + NewCgroupsManager func(config *configs.Cgroup, paths map[string]string) cgroups.Manager + Root string + Validator validate.Validator + func (l *LinuxFactory) Create(id string, config *configs.Config) (Container, error) + func (l *LinuxFactory) Load(id string) (Container, error) + func (l *LinuxFactory) StartInitialization() (err error) + func (l *LinuxFactory) Type() string + type NetworkInterface struct + Name string + RxBytes uint64 + RxDropped uint64 + RxErrors uint64 + RxPackets uint64 + TxBytes uint64 + TxDropped uint64 + TxErrors uint64 + TxPackets uint64 + type Process struct + Args []string + Capabilities []string + Cwd string + Env []string + ExtraFiles []*os.File + Stderr io.Writer + Stdin io.Reader + Stdout io.Writer + User string + func (p *Process) NewConsole(rootuid int) (Console, error) + func (p Process) Pid() (int, error) + func (p Process) Signal(sig os.Signal) error + func (p Process) Wait() (*os.ProcessState, error) type State + Config configs.Config + ID string + InitProcessPid int + InitProcessStartTime string + NamespacePaths map[configs.NamespaceType]string + type Stats struct + CgroupStats *cgroups.Stats + Interfaces []*NetworkInterface + type Status int v0.4.3 Apr 8, 2015 v0.4.2 Mar 31, 2015 Changes in this version + func DeleteState(basePath string) error + func NotifyOnOOM(s *State) (<-chan struct{}, error) — linux/amd64 + func SaveState(basePath string, state *State) error + type Config struct + AppArmorProfile string + Capabilities []string + Cgroups *cgroups.Cgroup + Env []string + Hostname string + MountConfig *MountConfig + Namespaces Namespaces + Networks []*Network + ProcessLabel string + RestrictSys bool + Rlimits []Rlimit + RootFs string + Routes []*Route + Tty bool + User string + WorkingDir string type Container + Config func() *Config + Destroy func() Error + ID func() string + Pause func() Error + Processes func() ([]int, Error) + Resume func() Error + RunState func() (*RunState, Error) + Start func(config *ProcessConfig) (pid int, exitChan chan int, err Error) + Stats func() (*ContainerStats, Error) + type ContainerStats struct + CgroupStats *cgroups.Stats + NetworkStats *network.NetworkStats + func GetStats(container *Config, state *State) (stats *ContainerStats, err error) + type Error interface + Code func() ErrorCode + Detail func() string + Stack func() []byte + type ErrorCode int + const ConfigInvalid + const ContainerDestroyed + const ContainerPaused + const IdInUse + const InvalidIdFormat + const SystemError + type Factory interface + Create func(id string, config *Config) (Container, Error) + Load func(id string) (Container, Error) + type MountConfig mount.MountConfig type Namespace + Path string + Type NamespaceType + type NamespaceType string + const NEWIPC + const NEWNET + const NEWNS + const NEWPID + const NEWUSER + const NEWUTS type Namespaces + func (n *Namespaces) Add(t NamespaceType, path string) + func (n *Namespaces) Remove(t NamespaceType) bool + type ProcessConfig struct + Args []string + Env []string + Stderr io.WriteCloser + Stdin io.ReadCloser + Stdout io.WriteCloser + type Rlimit struct + Hard uint64 + Soft uint64 + Type int + type RunState int + const Destroyed + const Paused + const Pausing + const Running + type State struct + CgroupPaths map[string]string + InitPid int + InitStartTime string + NetworkState network.NetworkState + func GetState(basePath string) (*State, error) v0.0.1 Nov 5, 2014 Changes in this version + var ErrUnkownCapability = errors.New("Unknown capability") + var ErrUnkownNamespace = errors.New("Unknown namespace") + var ErrUnsupported = errors.New("Unsupported method") + func GetAllCapabilities() []string + type Capabilities []*Capability + func (c Capabilities) Contains(capp string) bool + func (c Capabilities) Get(capp string) *Capability + type Capability struct + Key string + Value capability.Cap + func GetCapability(key string) *Capability + func (c *Capability) String() string + type Container struct + Capabilities []string + Cgroups *cgroups.Cgroup + Context Context + DeviceNodes []*devices.Device + Env []string + Hostname string + Mounts Mounts + Namespaces map[string]bool + Networks []*Network + NoPivotRoot bool + ReadonlyFs bool + Routes []*Route + Tty bool + User string + WorkingDir string + type Context map[string]string + type Mount struct + Destination string + Private bool + Source string + Type string + Writable bool + type Mounts []Mount + func (s Mounts) OfType(t string) Mounts + type Namespace struct + File string + Key string + Value int + func GetNamespace(key string) *Namespace + func (ns *Namespace) String() string + type Namespaces []*Namespace + func (n Namespaces) Contains(ns string) bool + func (n Namespaces) Get(ns string) *Namespace + type Network struct + Address string + Context Context + Gateway string + Mtu int + Type string + type Route struct + Destination string + Gateway string + InterfaceName string + Source string