resource

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type GenericHeadroomManager

type GenericHeadroomManager struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewGenericHeadroomManager

func NewGenericHeadroomManager(name v1.ResourceName, useMilliValue, reportMilliValue bool,
	syncPeriod time.Duration, headroomAdvisor hmadvisor.ResourceAdvisor,
	emitter metrics.MetricEmitter, slidingWindowOptions GenericSlidingWindowOptions,
	getReclaimOptions GetGenericReclaimOptionsFunc) *GenericHeadroomManager

func (*GenericHeadroomManager) GetAllocatable

func (m *GenericHeadroomManager) GetAllocatable() (resource.Quantity, error)

func (*GenericHeadroomManager) GetCapacity

func (m *GenericHeadroomManager) GetCapacity() (resource.Quantity, error)

func (*GenericHeadroomManager) Run

type GenericReclaimOptions

type GenericReclaimOptions struct {
	// EnableReclaim whether enable reclaim resource
	EnableReclaim bool
	// ReservedResourceForReport reserved resource for reporting to cnr
	ReservedResourceForReport resource.Quantity
	// MinReclaimedResourceForReport min reclaimed resource for reporting to cnr
	MinReclaimedResourceForReport resource.Quantity
}

type GenericSlidingWindowOptions

type GenericSlidingWindowOptions struct {
	// SlidingWindowTime duration of sliding window
	SlidingWindowTime time.Duration
	// MinStep min step of the value change
	MinStep resource.Quantity
	// MaxStep max step of the value change
	MaxStep       resource.Quantity
	AggregateFunc string
	AggregateArgs string
}

type GetGenericReclaimOptionsFunc

type GetGenericReclaimOptionsFunc func() GenericReclaimOptions

Jump to

Keyboard shortcuts

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