types

package
v1.28.0-alpha.19 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package types xxx

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CpusetNode

type CpusetNode struct {
	sync.RWMutex
	// cpuset node id
	// show available: 2 nodes (0-1)
	Id string
	// the node include cpusets
	// show node 0 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 24 25 26 27 28 29 30 31 32 33 34 35
	Cpuset []string
	// allocated cpuset of container
	// the cpuset belongs to only one container
	AllocatedCpuset     []string
	AllocatedCpusetTime map[string]time.Time
}

CpusetNode struct for cpuset node

func (*CpusetNode) AllocateCpuset

func (c *CpusetNode) AllocateCpuset(number int) ([]string, error)

AllocateCpuset allocate cpuset

func (*CpusetNode) Capacity

func (c *CpusetNode) Capacity() int

Capacity cpuset capacity

func (*CpusetNode) ReleaseCpuset

func (c *CpusetNode) ReleaseCpuset(cpuset []string)

ReleaseCpuset release cpuset

func (*CpusetNode) ReleaseCpusetWithoutLock

func (c *CpusetNode) ReleaseCpusetWithoutLock(cpuset []string)

ReleaseCpusetWithoutLock release cpuset without lock

Jump to

Keyboard shortcuts

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