cgroups

package
v0.0.0-...-baa551d Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2023 License: Apache-2.0 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
}

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