spec

package
v0.5.15 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// authentic power alert code
	PowerAlertS0 PowerAlert = "s0"
	PowerAlertP0 PowerAlert = "p0"
	PowerAlertP1 PowerAlert = "p1"
	PowerAlertP2 PowerAlert = "p2"

	// PowerAlertOK is derivative power alert code which corresponds to NON-existent power alert annotation
	PowerAlertOK PowerAlert = "ok"

	InternalOpAuto     InternalOp = 0 // default op allowing plugin makes decision by itself
	InternalOpThrottle InternalOp = 1 // op demanding plugin choose throttling compute resources only
	InternalOpEvict    InternalOp = 2 // op demanding plugin choose eviction only
	InternalOpFreqCap  InternalOp = 4 // op demanding plugin to choose cpu frequency capping only
	InternalOpNoop     InternalOp = 8 // op demanding plugin not making any policy

	AnnoKeyPowerAlert      = "power-alert"
	AnnoKeyPowerBudget     = "power-budget"
	AnnoKeyPowerAlertTime  = "power-alert-time"
	AnnoKeyPowerInternalOp = "power-internal-op"
)

Variables

This section is empty.

Functions

func GetPowerAlertResponseTimeLimit

func GetPowerAlertResponseTimeLimit(alert PowerAlert) (time.Duration, error)

Types

type InternalOp

type InternalOp int

func (InternalOp) String

func (o InternalOp) String() string

type PowerAlert

type PowerAlert string

type PowerSpec

type PowerSpec struct {
	Alert      PowerAlert
	Budget     int
	InternalOp InternalOp
	AlertTime  time.Time
}

type SpecFetcher

type SpecFetcher interface {
	GetPowerSpec(ctx context.Context) (*PowerSpec, error)
}

func NewFetcher

func NewFetcher(nodeFetcher node.NodeFetcher, annotationKeyPrefix string) SpecFetcher

Jump to

Keyboard shortcuts

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