Documentation ¶
Index ¶
- Variables
- func Apply(c *cgroups.Cgroup, pid int) (cgroups.ActiveCgroup, error)
- func Cleanup(c *cgroups.Cgroup) error
- func Freeze(c *cgroups.Cgroup, state cgroups.FreezerState) error
- func GetPids(c *cgroups.Cgroup) ([]int, error)
- func GetStats(c *cgroups.Cgroup) (*cgroups.Stats, error)
- func NotifyOnOOM(c *cgroups.Cgroup) (<-chan struct{}, error)
- type BlkioGroup
- type CpuGroup
- type CpuacctGroup
- type CpusetGroup
- type DevicesGroup
- type FreezerGroup
- type MemoryGroup
- type PerfEventGroup
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotSupportStat = errors.New("stats are not supported for subsystem") ErrNotValidFormat = errors.New("line is not a valid key value format") )
View Source
var (
CgroupProcesses = "cgroup.procs"
)
Functions ¶
func Freeze ¶
func Freeze(c *cgroups.Cgroup, state cgroups.FreezerState) error
Freeze toggles the container's freezer cgroup depending on the state provided
func NotifyOnOOM ¶ added in v1.1.0
NotifyOnOOM sends signals on the returned channel when the cgroup reaches its memory limit. The channel is closed when the cgroup is removed.
Types ¶
type BlkioGroup ¶ added in v1.2.0
type BlkioGroup struct { }
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(d *data) error
type CpuGroup ¶ added in v1.2.0
type CpuGroup struct { }
type CpuacctGroup ¶ added in v1.2.0
type CpuacctGroup struct { }
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(d *data) error
type CpusetGroup ¶ added in v1.2.0
type CpusetGroup struct { }
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(d *data) error
type DevicesGroup ¶ added in v1.2.0
type DevicesGroup struct { }
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(d *data) error
type FreezerGroup ¶ added in v1.2.0
type FreezerGroup struct { }
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(d *data) error
type MemoryGroup ¶ added in v1.2.0
type MemoryGroup struct { }
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(d *data) error
type PerfEventGroup ¶ added in v1.2.0
type PerfEventGroup struct { }
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(d *data) error
Click to show internal directories.
Click to hide internal directories.