fs

package
v1.3.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2016 License: Apache-2.0, Apache-2.0 Imports: 15 Imported by: 0

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

type BlkioGroup struct {
}

func (*BlkioGroup) Apply

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

func (*BlkioGroup) GetStats

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

func (*BlkioGroup) Name

func (s *BlkioGroup) Name() string

func (*BlkioGroup) Remove

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

func (*BlkioGroup) Set

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

type CpuGroup

type CpuGroup struct {
}

func (*CpuGroup) Apply

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

func (*CpuGroup) GetStats

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

func (*CpuGroup) Name

func (s *CpuGroup) Name() string

func (*CpuGroup) Remove

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

func (*CpuGroup) Set

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

type CpuacctGroup

type CpuacctGroup struct {
}

func (*CpuacctGroup) Apply

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

func (*CpuacctGroup) GetStats

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

func (*CpuacctGroup) Name

func (s *CpuacctGroup) Name() string

func (*CpuacctGroup) Remove

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

func (*CpuacctGroup) Set

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

type CpusetGroup

type CpusetGroup struct {
}

func (*CpusetGroup) Apply

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

func (*CpusetGroup) ApplyDir

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

func (*CpusetGroup) GetStats

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

func (*CpusetGroup) Name

func (s *CpusetGroup) Name() string

func (*CpusetGroup) Remove

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

func (*CpusetGroup) Set

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

type DevicesGroup

type DevicesGroup struct {
}

func (*DevicesGroup) Apply

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

func (*DevicesGroup) GetStats

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

func (*DevicesGroup) Name

func (s *DevicesGroup) Name() string

func (*DevicesGroup) Remove

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

func (*DevicesGroup) Set

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

type FreezerGroup

type FreezerGroup struct {
}

func (*FreezerGroup) Apply

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

func (*FreezerGroup) GetStats

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

func (*FreezerGroup) Name

func (s *FreezerGroup) Name() string

func (*FreezerGroup) Remove

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

func (*FreezerGroup) Set

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

type HugetlbGroup

type HugetlbGroup struct {
}

func (*HugetlbGroup) Apply

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

func (*HugetlbGroup) GetStats

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

func (*HugetlbGroup) Name

func (s *HugetlbGroup) Name() string

func (*HugetlbGroup) Remove

func (s *HugetlbGroup) Remove(d *cgroupData) 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) (err 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) GetAllPids

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

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

type MemoryGroup struct {
}

func (*MemoryGroup) Apply

func (s *MemoryGroup) Apply(d *cgroupData) (err error)

func (*MemoryGroup) GetStats

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

func (*MemoryGroup) Name

func (s *MemoryGroup) Name() string

func (*MemoryGroup) Remove

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

func (*MemoryGroup) Set

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

func (*MemoryGroup) SetKernelMemory

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

type NameGroup

type NameGroup struct {
	GroupName string
}

func (*NameGroup) Apply

func (s *NameGroup) Apply(d *cgroupData) error

func (*NameGroup) GetStats

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

func (*NameGroup) Name

func (s *NameGroup) Name() string

func (*NameGroup) Remove

func (s *NameGroup) Remove(d *cgroupData) error

func (*NameGroup) Set

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

type NetClsGroup

type NetClsGroup struct {
}

func (*NetClsGroup) Apply

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

func (*NetClsGroup) GetStats

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

func (*NetClsGroup) Name

func (s *NetClsGroup) Name() string

func (*NetClsGroup) Remove

func (s *NetClsGroup) Remove(d *cgroupData) 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 *cgroupData) error

func (*NetPrioGroup) GetStats

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

func (*NetPrioGroup) Name

func (s *NetPrioGroup) Name() string

func (*NetPrioGroup) Remove

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

func (*NetPrioGroup) Set

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

type PerfEventGroup

type PerfEventGroup struct {
}

func (*PerfEventGroup) Apply

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

func (*PerfEventGroup) GetStats

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

func (*PerfEventGroup) Name

func (s *PerfEventGroup) Name() string

func (*PerfEventGroup) Remove

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

func (*PerfEventGroup) Set

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

type PidsGroup

type PidsGroup struct {
}

func (*PidsGroup) Apply

func (s *PidsGroup) Apply(d *cgroupData) error

func (*PidsGroup) GetStats

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

func (*PidsGroup) Name

func (s *PidsGroup) Name() string

func (*PidsGroup) Remove

func (s *PidsGroup) Remove(d *cgroupData) error

func (*PidsGroup) Set

func (s *PidsGroup) 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