cache

package
v2.14.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 11 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 scalersconfig.ScalerConfig
	Factory      func() (scalers.Scaler, *scalersconfig.ScalerConfig, error)
}

type ScalersCache

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

func (*ScalersCache) Close

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

Close closes all scalers in the cache

func (*ScalersCache) GetMetricSpecForScaling

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

GetMetricSpecForScaling returns metrics specs for all scalers in the cache

func (*ScalersCache) GetMetricSpecForScalingForScaler added in v2.10.0

func (c *ScalersCache) GetMetricSpecForScalingForScaler(ctx context.Context, index int) ([]v2.MetricSpec, error)

GetMetricSpecForScalingForScaler returns metrics spec for a scaler identified by the metric name

func (*ScalersCache) GetMetricsAndActivityForScaler added in v2.10.0

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

GetMetricsAndActivityForScaler returns metric value, activity and latency 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

GetPushScalers returns array of push scalers stored in the cache

func (*ScalersCache) GetScalers

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

GetScalers returns array of scalers and scaler config stored in the cache

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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