cache

package
v2.9.1 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ScalerBuilder

type ScalerBuilder struct {
	Scaler       scalers.Scaler
	ScalerConfig scalers.ScalerConfig
	Factory      func() (scalers.Scaler, *scalers.ScalerConfig, error)
}

type ScalersCache

type ScalersCache struct {
	ScaledObject             *kedav1alpha1.ScaledObject
	Scalers                  []ScalerBuilder
	ScalableObjectGeneration int64
	Recorder                 record.EventRecorder
}

func (*ScalersCache) Close

func (c *ScalersCache) Close(ctx context.Context)

func (*ScalersCache) GetMetricSpecForScaling

func (c *ScalersCache) GetMetricSpecForScaling(ctx context.Context) []v2.MetricSpec

func (*ScalersCache) GetMetricsForScaler

func (c *ScalersCache) GetMetricsForScaler(ctx context.Context, index int, metricName string) ([]external_metrics.ExternalMetricValue, error)

GetMetricsForScaler returns metric value for a scaler identified by the metric name and by the input index (from the list of scalers in this ScaledObject)

func (*ScalersCache) GetPushScalers

func (c *ScalersCache) GetPushScalers() []scalers.PushScaler

func (*ScalersCache) GetScaledObjectState added in v2.9.0

func (c *ScalersCache) GetScaledObjectState(ctx context.Context, scaledObject *kedav1alpha1.ScaledObject) (bool, bool, map[string]metricscache.MetricsRecord)

GetScaledObjectState returns whether the input ScaledObject is active as a first parameters, the second parameter indicates whether there was any error during quering scalers the third parameter returns map of metrics record - a metric value for each scaler and it's metric

func (*ScalersCache) GetScalers

func (c *ScalersCache) GetScalers() ([]scalers.Scaler, []scalers.ScalerConfig)

func (*ScalersCache) IsScaledJobActive

func (c *ScalersCache) IsScaledJobActive(ctx context.Context, scaledJob *kedav1alpha1.ScaledJob) (bool, int64, int64)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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