resourceusage

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Getter

type Getter interface {
	// UsagesByValue return absolute resource usage of node
	UsagesByValue(includeGuaranteedPods bool) Resource
	// UsagesByPercentage return resource usage percentage of node
	UsagesByPercentage(node *v1.Node) Resource
}

Getter is used to get cpu/memory usage of current node.

func NewFakeResourceGetter

func NewFakeResourceGetter(cpuUsageByValue, memoryUsageByValue, cpuUsageByPercent, memoryUsageByPercent int64) Getter

func NewUsageGetter

func NewUsageGetter(mgr *metriccollect.MetricCollectorManager, collectorName string) Getter

NewUsageGetter create a usage getter

type Resource

type Resource map[v1.ResourceName]int64

Resource include the overSubscription resource on this node

Jump to

Keyboard shortcuts

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