manager

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRegisteredManagerInitializers

func GetRegisteredManagerInitializers() map[v1.ResourceName]InitFunc

GetRegisteredManagerInitializers is used to get registered user-defined headroom manager init functions

func RegisterHeadroomManagerInitializer

func RegisterHeadroomManagerInitializer(name v1.ResourceName, initFunc InitFunc)

RegisterHeadroomManagerInitializer is used to register user-defined headroom manager init functions

Types

type HeadroomManager

type HeadroomManager interface {
	// GetAllocatable return the allocatable resource of this resource
	GetAllocatable() (resource.Quantity, error)
	// GetCapacity return the capacity of this resource
	GetCapacity() (resource.Quantity, error)
	// Run this resource manager
	Run(ctx context.Context)
}

HeadroomManager is used to manage resource headroom reporting and overcommit.

type InitFunc

type InitFunc func(emitter metrics.MetricEmitter, metaServer *metaserver.MetaServer,
	conf *config.Configuration, headroomAdvisor hmadvisor.ResourceAdvisor) (HeadroomManager, error)

InitFunc is used to init headroom manager

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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