algorithm

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CorrectedInstancesAlgorithm

type CorrectedInstancesAlgorithm struct {
	IsPanic              bool
	History              *History
	Behavior             *v1alpha1.AutoscalingPolicyBehavior
	MinInstances         int32
	MaxInstances         int32
	CurrentInstances     int32
	RecommendedInstances int32
}

func (CorrectedInstancesAlgorithm) GetCorrectedInstances

func (alg CorrectedInstancesAlgorithm) GetCorrectedInstances() int32

type History

type History struct {
	MaxRecommendation     *datastructure.RmqRecordSlidingWindow[int32]
	MinRecommendation     *datastructure.RmqRecordSlidingWindow[int32]
	MaxCorrected          *datastructure.RmqLineChartSlidingWindow[int32]
	MinCorrectedForStable *datastructure.RmqLineChartSlidingWindow[int32]
	MinCorrectedForPanic  *datastructure.RmqLineChartSlidingWindow[int32]
}

type Metrics

type Metrics = map[string]float64

type RecommendedInstancesAlgorithm

type RecommendedInstancesAlgorithm struct {
	MinInstances          int32
	MaxInstances          int32
	CurrentInstancesCount int32
	Tolerance             float64
	MetricTargets         Metrics
	UnreadyInstancesCount int32
	ReadyInstancesMetrics []Metrics
	ExternalMetrics       Metrics
}

func (*RecommendedInstancesAlgorithm) GetRecommendedInstances

func (alg *RecommendedInstancesAlgorithm) GetRecommendedInstances() (recommendedInstances int32, skip bool)

Jump to

Keyboard shortcuts

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