fs

package
v2.2.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2015 License: Apache-2.0 Imports: 15 Imported by: 967

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CgroupProcesses  = "cgroup.procs"
	HugePageSizes, _ = cgroups.GetHugePageSize()
)
View Source
var (
	ErrNotSupportStat = errors.New("stats are not supported for subsystem")
	ErrNotValidFormat = errors.New("line is not a valid key value format")
)

Functions

func CheckCpushares

func CheckCpushares(path string, c int64) error

Types

type BlkioGroup added in v1.2.0

type BlkioGroup struct {
}

func (*BlkioGroup) Apply

func (s *BlkioGroup) Apply(d *data) error

func (*BlkioGroup) GetStats added in v1.2.0

func (s *BlkioGroup) GetStats(path string, stats *cgroups.Stats) error

func (*BlkioGroup) Remove added in v1.2.0

func (s *BlkioGroup) Remove(d *data) error

func (*BlkioGroup) Set added in v1.2.0

func (s *BlkioGroup) Set(path string, cgroup *configs.Cgroup) error

type CpuGroup added in v1.2.0

type CpuGroup struct {
}

func (*CpuGroup) Apply

func (s *CpuGroup) Apply(d *data) error

func (*CpuGroup) GetStats added in v1.2.0

func (s *CpuGroup) GetStats(path string, stats *cgroups.Stats) error

func (*CpuGroup) Remove added in v1.2.0

func (s *CpuGroup) Remove(d *data) error

func (*CpuGroup) Set added in v1.2.0

func (s *CpuGroup) Set(path string, cgroup *configs.Cgroup) error

type CpuacctGroup added in v1.2.0

type CpuacctGroup struct {
}

func (*CpuacctGroup) Apply

func (s *CpuacctGroup) Apply(d *data) error

func (*CpuacctGroup) GetStats added in v1.2.0

func (s *CpuacctGroup) GetStats(path string, stats *cgroups.Stats) error

func (*CpuacctGroup) Remove added in v1.2.0

func (s *CpuacctGroup) Remove(d *data) error

func (*CpuacctGroup) Set added in v1.2.0

func (s *CpuacctGroup) Set(path string, cgroup *configs.Cgroup) error

type CpusetGroup added in v1.2.0

type CpusetGroup struct {
}

func (*CpusetGroup) Apply

func (s *CpusetGroup) Apply(d *data) error

func (*CpusetGroup) ApplyDir

func (s *CpusetGroup) ApplyDir(dir string, cgroup *configs.Cgroup, pid int) error

func (*CpusetGroup) GetStats added in v1.2.0

func (s *CpusetGroup) GetStats(path string, stats *cgroups.Stats) error

func (*CpusetGroup) Remove added in v1.2.0

func (s *CpusetGroup) Remove(d *data) error

func (*CpusetGroup) Set added in v1.2.0

func (s *CpusetGroup) Set(path string, cgroup *configs.Cgroup) error

type DevicesGroup added in v1.2.0

type DevicesGroup struct {
}

func (*DevicesGroup) Apply

func (s *DevicesGroup) Apply(d *data) error

func (*DevicesGroup) GetStats added in v1.2.0

func (s *DevicesGroup) GetStats(path string, stats *cgroups.Stats) error

func (*DevicesGroup) Remove added in v1.2.0

func (s *DevicesGroup) Remove(d *data) error

func (*DevicesGroup) Set added in v1.2.0

func (s *DevicesGroup) Set(path string, cgroup *configs.Cgroup) error

type FreezerGroup added in v1.2.0

type FreezerGroup struct {
}

func (*FreezerGroup) Apply

func (s *FreezerGroup) Apply(d *data) error

func (*FreezerGroup) GetStats added in v1.2.0

func (s *FreezerGroup) GetStats(path string, stats *cgroups.Stats) error

func (*FreezerGroup) Remove added in v1.2.0

func (s *FreezerGroup) Remove(d *data) error

func (*FreezerGroup) Set added in v1.2.0

func (s *FreezerGroup) Set(path string, cgroup *configs.Cgroup) error

type HugetlbGroup

type HugetlbGroup struct {
}

func (*HugetlbGroup) Apply

func (s *HugetlbGroup) Apply(d *data) error

func (*HugetlbGroup) GetStats

func (s *HugetlbGroup) GetStats(path string, stats *cgroups.Stats) error

func (*HugetlbGroup) Remove

func (s *HugetlbGroup) Remove(d *data) error

func (*HugetlbGroup) Set

func (s *HugetlbGroup) Set(path string, cgroup *configs.Cgroup) error

type Manager

type Manager struct {
	Cgroups *configs.Cgroup
	Paths   map[string]string
	// contains filtered or unexported fields
}

func (*Manager) Apply

func (m *Manager) Apply(pid int) error

func (*Manager) Destroy

func (m *Manager) Destroy() error

func (*Manager) Freeze

func (m *Manager) Freeze(state configs.FreezerState) error

Freeze toggles the container's freezer cgroup depending on the state provided

func (*Manager) GetPaths

func (m *Manager) GetPaths() map[string]string

func (*Manager) GetPids

func (m *Manager) GetPids() ([]int, error)

func (*Manager) GetStats

func (m *Manager) GetStats() (*cgroups.Stats, error)

func (*Manager) Set

func (m *Manager) Set(container *configs.Config) error

type MemoryGroup added in v1.2.0

type MemoryGroup struct {
}

func (*MemoryGroup) Apply

func (s *MemoryGroup) Apply(d *data) error

func (*MemoryGroup) GetStats added in v1.2.0

func (s *MemoryGroup) GetStats(path string, stats *cgroups.Stats) error

func (*MemoryGroup) Remove added in v1.2.0

func (s *MemoryGroup) Remove(d *data) error

func (*MemoryGroup) Set added in v1.2.0

func (s *MemoryGroup) Set(path string, cgroup *configs.Cgroup) error

type NetClsGroup

type NetClsGroup struct {
}

func (*NetClsGroup) Apply

func (s *NetClsGroup) Apply(d *data) error

func (*NetClsGroup) GetStats

func (s *NetClsGroup) GetStats(path string, stats *cgroups.Stats) error

func (*NetClsGroup) Remove

func (s *NetClsGroup) Remove(d *data) error

func (*NetClsGroup) Set

func (s *NetClsGroup) Set(path string, cgroup *configs.Cgroup) error

type NetPrioGroup

type NetPrioGroup struct {
}

func (*NetPrioGroup) Apply

func (s *NetPrioGroup) Apply(d *data) error

func (*NetPrioGroup) GetStats

func (s *NetPrioGroup) GetStats(path string, stats *cgroups.Stats) error

func (*NetPrioGroup) Remove

func (s *NetPrioGroup) Remove(d *data) error

func (*NetPrioGroup) Set

func (s *NetPrioGroup) Set(path string, cgroup *configs.Cgroup) error

type PerfEventGroup added in v1.2.0

type PerfEventGroup struct {
}

func (*PerfEventGroup) Apply

func (s *PerfEventGroup) Apply(d *data) error

func (*PerfEventGroup) GetStats added in v1.2.0

func (s *PerfEventGroup) GetStats(path string, stats *cgroups.Stats) error

func (*PerfEventGroup) Remove added in v1.2.0

func (s *PerfEventGroup) Remove(d *data) error

func (*PerfEventGroup) Set added in v1.2.0

func (s *PerfEventGroup) Set(path string, cgroup *configs.Cgroup) error

Jump to

Keyboard shortcuts

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