handler

package
v0.0.0-...-90dbcc8 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2019 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ScaleHandler

type ScaleHandler struct {
	// contains filtered or unexported fields
}

ScaleHandler encapsulates the logic of calling the right scalers for each ScaledObject and making the final scale decision and operation

func NewScaleHandler

func NewScaleHandler(kedaClient clientset.Interface, kubeClient kubernetes.Interface) *ScaleHandler

NewScaleHandler creates a ScaleHandler object

func (*ScaleHandler) GetExternalMetricNames

func (h *ScaleHandler) GetExternalMetricNames() []string

GetExternalMetricNames returns the exteral metrics of the triggers of the current scaled objects

func (*ScaleHandler) GetScaledObjectMetrics

func (h *ScaleHandler) GetScaledObjectMetrics(namespace string, metricSelector labels.Selector, metricName string) ([]external_metrics.ExternalMetricValue, error)

GetScaledObjectMetrics is used by the metric adapter in provider.go to get the value for a metric for a scaled object

func (*ScaleHandler) HandleScaledObjectDelete

func (h *ScaleHandler) HandleScaledObjectDelete(scaledObject *keda_v1alpha1.ScaledObject)

HandleScaledObjectDelete handles any cleanup when a scaled object is deleted

func (*ScaleHandler) WatchScaledObjectWithContext

func (h *ScaleHandler) WatchScaledObjectWithContext(ctx context.Context, scaledObject *keda_v1alpha1.ScaledObject, isDue bool)

TODO confusing naming switching from isUpdate (controller) -> isDue (here)[] WatchScaledObjectWithContext runs a handleScaleLoop go-routine for the scaledObject

Jump to

Keyboard shortcuts

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