scaledjob

package
v2.16.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateQueueLengthAndMaxValue

func CalculateQueueLengthAndMaxValue(metrics []external_metrics.ExternalMetricValue, metricSpecs []v2.MetricSpec, maxReplicaCount int64) (queueLength, maxValue, targetAverageValue float64)

CalculateQueueLengthAndMaxValue returns queueLength, maxValue, and targetAverageValue for the given metrics

func IsScaledJobActive

func IsScaledJobActive(scalersMetrics []ScalerMetrics, multipleScalersCalculation string, minReplicaCount, maxReplicaCount int64) (bool, int64, int64, float64)

IsScaledJobActive returns whether the input ScaledJob is active and queueLength and maxValue for scale

Types

type ScalerMetrics

type ScalerMetrics struct {
	QueueLength float64
	MaxValue    float64
	IsActive    bool
}

Jump to

Keyboard shortcuts

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