cgroups

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func InitLog

func InitLog(sugar *zap.SugaredLogger)

Types

type CgroupManager

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

func NewCgroupManager

func NewCgroupManager(path string) *CgroupManager

func (*CgroupManager) Apply

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

将进程pid加入到这个cgroup中

func (*CgroupManager) Destroy

func (c *CgroupManager) Destroy() error

释放cgroup

func (*CgroupManager) Set

设置cgroup资源限制

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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