resources

package
v0.0.0-...-14b4a77 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCPUMaxFileNotFound = errors.New("cpu.max file not found")
)

Functions

This section is empty.

Types

type ResourceManager

type ResourceManager struct {
}

func New

func New() *ResourceManager

func (*ResourceManager) CreateSlice

func (r *ResourceManager) CreateSlice(ctx context.Context, w entity.Workload) error

func (*ResourceManager) GetCGroup

func (r *ResourceManager) GetCGroup(ctx context.Context, rxp *regexp.Regexp, fullPath bool) (string, error)

func (*ResourceManager) GetResources

func (r *ResourceManager) GetResources(ctx context.Context, cgroup string) (entity.CpuResource, error)

func (*ResourceManager) GetRootSlice

func (r *ResourceManager) GetRootSlice(sliceType SliceType) string

func (*ResourceManager) RemoveSlice

func (r *ResourceManager) RemoveSlice(ctx context.Context, path string) error

func (*ResourceManager) Set

func (r *ResourceManager) Set(ctx context.Context, path string, resources entity.CpuResource) error

func (*ResourceManager) SliceExists

func (r *ResourceManager) SliceExists(ctx context.Context, path string) bool

type SliceType

type SliceType int
const (
	UserSlice SliceType = iota
	SystemSlice
	MachineSlice
)

Jump to

Keyboard shortcuts

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