subsystem

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IdFieldNumber uint8 = 0
)
View Source
const (
	MaxTextValue = "max"
)

Variables

Functions

func PidPath

func PidPath(pid uint64) path.Path

func ReadParam

func ReadParam(paramFilePath string) (string, error)

func ReadParamInt64

func ReadParamInt64(paramFilePath string) (int64, error)

func ReadParamUint64

func ReadParamUint64(paramFilePath string) (uint64, error)

Types

type Name

type Name string
const (
	Devices   Name = "devices"
	Hugetlb   Name = "hugetlb"
	Freezer   Name = "freezer"
	Pids      Name = "pids"
	NetCLS    Name = "net_cls"
	NetPrio   Name = "net_prio"
	PerfEvent Name = "perf_event"
	Cpuset    Name = "cpuset"
	Cpu       Name = "cpu"
	Cpuacct   Name = "cpuacct"
	Memory    Name = "memory"
	Blkio     Name = "blkio"
	Rdma      Name = "rdma"
	CGroupV2  Name = ""
)

type Option

type Option func(p *Parser)

func WithPath

func WithPath(path path.Path) Option

type Parser

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

func NewParser

func NewParser(options ...Option) *Parser

func (*Parser) Parse

func (parser *Parser) Parse() error

func (*Parser) Subsystems

func (parser *Parser) Subsystems() (*linker.Linker[Name, *Subsystem], error)

type Subsystem

type Subsystem struct {
	Id                 uint8
	Name               Name
	MountPointRootPath path.Path
}

Jump to

Keyboard shortcuts

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