fs2

package
v1.0.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const UnifiedMountpoint = "/sys/fs/cgroup"

Variables

This section is empty.

Functions

func CheckMemoryUsage

func CheckMemoryUsage(dirPath string, r *config.Resources) error

func CreateCgroupPath

func CreateCgroupPath(path string, c *config.Cgroup) (Err error)

func ParseKeyValue

func ParseKeyValue(t string) (string, uint64, error)

解析cgroup里的"key value" 例如,"io_service_bytes_1234" 将要返回"io_service_bytes", 1234

func ParseUint

func ParseUint(s string, base, bitSize int) (uint64, error)

转换字符串为64位无符号整数

func SetCpuset

func SetCpuset(dirPath string, r *config.Resources) error

Types

type BaseManager

type BaseManager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(config *config.Cgroup, dirPath string) (*BaseManager, error)

type ParseError

type ParseError struct {
	Path string
	File string
	Err  error
}

记录解析错误

func (*ParseError) Error

func (e *ParseError) Error() string

func (*ParseError) UnWrap

func (e *ParseError) UnWrap() error

Jump to

Keyboard shortcuts

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