Documentation
¶
Index ¶
- func GetRegisteredInitializers() map[types.CPUHeadroomPolicyName]InitFunc
- func RegisterInitializer(name types.CPUHeadroomPolicyName, initFunc InitFunc)
- type HeadroomPolicy
- func NewPolicyCanonical(regionName string, regionType types.QoSRegionType, ownerPoolName string, ...) HeadroomPolicy
- func NewPolicyNUMAExclusive(regionName string, regionType types.QoSRegionType, ownerPoolName string, ...) HeadroomPolicy
- func NewPolicyNone(_ string, _ types.QoSRegionType, _ string, _ *config.Configuration, ...) HeadroomPolicy
- type InitFunc
- type PolicyBase
- type PolicyCanonical
- type PolicyNUMAExclusive
- type PolicyNone
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRegisteredInitializers ¶
func GetRegisteredInitializers() map[types.CPUHeadroomPolicyName]InitFunc
func RegisterInitializer ¶
func RegisterInitializer(name types.CPUHeadroomPolicyName, initFunc InitFunc)
Types ¶
type HeadroomPolicy ¶
type HeadroomPolicy interface { // SetPodSet overwrites policy's pod/container record SetPodSet(types.PodSet) // SetBindingNumas overwrites the numa ids this policy interested in SetBindingNumas(machine.CPUSet) // SetEssentials updates essential values for policy update SetEssentials(essentials types.ResourceEssentials) // Update triggers an episode of headroom update Update() error // GetHeadroom returns the latest legal headroom estimation GetHeadroom() (float64, error) }
HeadroomPolicy generates resource headroom estimation based on configured algorithm
func NewPolicyCanonical ¶
func NewPolicyCanonical(regionName string, regionType types.QoSRegionType, ownerPoolName string, _ *config.Configuration, _ interface{}, metaReader metacache.MetaReader, metaServer *metaserver.MetaServer, emitter metrics.MetricEmitter) HeadroomPolicy
func NewPolicyNUMAExclusive ¶ added in v0.3.0
func NewPolicyNUMAExclusive(regionName string, regionType types.QoSRegionType, ownerPoolName string, _ *config.Configuration, _ interface{}, metaReader metacache.MetaReader, metaServer *metaserver.MetaServer, emitter metrics.MetricEmitter) HeadroomPolicy
func NewPolicyNone ¶ added in v0.4.0
func NewPolicyNone(_ string, _ types.QoSRegionType, _ string, _ *config.Configuration, _ interface{}, _ metacache.MetaReader, _ *metaserver.MetaServer, _ metrics.MetricEmitter) HeadroomPolicy
type InitFunc ¶
type InitFunc func(regionName string, regionType types.QoSRegionType, ownerPoolName string, conf *config.Configuration, extraConfig interface{}, metaReader metacache.MetaReader, metaServer *metaserver.MetaServer, emitter metrics.MetricEmitter) HeadroomPolicy
type PolicyBase ¶
type PolicyBase struct { types.ResourceEssentials // contains filtered or unexported fields }
func NewPolicyBase ¶
func NewPolicyBase(regionName string, regionType types.QoSRegionType, ownerPoolName string, metaReader metacache.MetaReader, metaServer *metaserver.MetaServer, emitter metrics.MetricEmitter) *PolicyBase
func (*PolicyBase) SetBindingNumas ¶ added in v0.3.0
func (p *PolicyBase) SetBindingNumas(numas machine.CPUSet)
func (*PolicyBase) SetEssentials ¶
func (p *PolicyBase) SetEssentials(essentials types.ResourceEssentials)
func (*PolicyBase) SetPodSet ¶
func (p *PolicyBase) SetPodSet(podSet types.PodSet)
type PolicyCanonical ¶
type PolicyCanonical struct { *PolicyBase // contains filtered or unexported fields }
func (*PolicyCanonical) GetHeadroom ¶
func (p *PolicyCanonical) GetHeadroom() (float64, error)
func (*PolicyCanonical) Update ¶
func (p *PolicyCanonical) Update() error
type PolicyNUMAExclusive ¶ added in v0.3.0
type PolicyNUMAExclusive struct { *PolicyBase // contains filtered or unexported fields }
func (*PolicyNUMAExclusive) GetHeadroom ¶ added in v0.3.0
func (p *PolicyNUMAExclusive) GetHeadroom() (float64, error)
func (*PolicyNUMAExclusive) Update ¶ added in v0.3.0
func (p *PolicyNUMAExclusive) Update() error
type PolicyNone ¶ added in v0.4.0
type PolicyNone struct{}
func (*PolicyNone) GetHeadroom ¶ added in v0.4.0
func (p *PolicyNone) GetHeadroom() (float64, error)
func (*PolicyNone) SetBindingNumas ¶ added in v0.4.0
func (p *PolicyNone) SetBindingNumas(machine.CPUSet)
func (*PolicyNone) SetEssentials ¶ added in v0.4.0
func (p *PolicyNone) SetEssentials(types.ResourceEssentials)
func (*PolicyNone) SetPodSet ¶ added in v0.4.0
func (p *PolicyNone) SetPodSet(types.PodSet)
func (*PolicyNone) Update ¶ added in v0.4.0
func (p *PolicyNone) Update() error
Click to show internal directories.
Click to hide internal directories.