cgroups

package
v0.8.2-0...-fb314c2 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2014 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInitCgroupDir

func GetInitCgroupDir(subsystem string) (string, error)

func GetThisCgroupDir

func GetThisCgroupDir(subsystem string) (string, error)

Returns the relative path to the cgroup docker is running in.

Types

type Cgroup

type Cgroup struct {
	Name   string `json:"name,omitempty"`
	Parent string `json:"parent,omitempty"`

	DeviceAccess bool  `json:"device_access,omitempty"` // name of parent cgroup or slice
	Memory       int64 `json:"memory,omitempty"`        // Memory limit (in bytes)
	MemorySwap   int64 `json:"memory_swap,omitempty"`   // Total memory usage (memory + swap); set `-1' to disable swap
	CpuShares    int64 `json:"cpu_shares,omitempty"`    // CPU shares (relative weight vs. other containers)
}

func (*Cgroup) Apply

func (c *Cgroup) Apply(pid int) error

func (*Cgroup) Cleanup

func (c *Cgroup) Cleanup(root string) error

func (*Cgroup) Join

func (c *Cgroup) Join(root, subsystem string, pid int) (string, error)

func (*Cgroup) Path

func (c *Cgroup) Path(root, subsystem string) (string, error)

Jump to

Keyboard shortcuts

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