cgroup

package
v0.13.8 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: Apache-2.0 Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCgroupNotSupported = errors.New("cgroups: cgroup not supported")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	MemoryLimitInBytes int64
}

type DaemonCgroup

type DaemonCgroup interface {
	// Delete the current cgroup.
	Delete() error
	// Add a process to current cgroup.
	AddProc(pid int) error
}

type Manager

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

func NewManager

func NewManager(opt Opt) (*Manager, error)

func (*Manager) AddProc

func (m *Manager) AddProc(pid int) error

Please make sure the *Manager is not null.

func (*Manager) Delete

func (m *Manager) Delete() error

Please make sure the *Manager is not null.

type Opt

type Opt struct {
	Name   string
	Config Config
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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