cgroups

package
v0.0.0-...-df8a2fc Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CgroupManager

type CgroupManager struct {
	// cgroup在hierarchy中的路径,相当于创建的cgroup目录相对于root cgroup目录的路径
	Path string
	// 资源配置
	Resource *subsystems.ResourceConfig
}

CgroupManager control group 管理

func NewCgroupManager

func NewCgroupManager(path string) *CgroupManager

func (*CgroupManager) Apply

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

Apply 将进程pid加入到这个cgroup中

func (*CgroupManager) Destroy

func (c *CgroupManager) Destroy() error

Destroy 释放cgroup

func (*CgroupManager) Set

Set 设置cgroup资源限制

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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