Documentation ¶
Index ¶
- type ScalerBuilder
- type ScalersCache
- func (c *ScalersCache) Close(ctx context.Context)
- func (c *ScalersCache) GetMetricSpecForScaling(ctx context.Context) []v2.MetricSpec
- func (c *ScalersCache) GetMetricSpecForScalingForScaler(ctx context.Context, index int) ([]v2.MetricSpec, error)
- func (c *ScalersCache) GetMetricsAndActivityForScaler(ctx context.Context, index int, metricName string) ([]external_metrics.ExternalMetricValue, bool, int64, error)
- func (c *ScalersCache) GetPushScalers() []scalers.PushScaler
- func (c *ScalersCache) GetScalers() ([]scalers.Scaler, []scalersconfig.ScalerConfig)
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, int64, 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
Click to show internal directories.
Click to hide internal directories.