provider

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2020 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProvider

func NewProvider(adapterLogger logr.Logger, scaleHandler *handler.ScaleHandler, client client.Client, watchedNamespace string) provider.MetricsProvider

NewProvider returns an instance of KedaProvider

Types

type KedaProvider

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

KedaProvider implements External Metrics Provider

func (*KedaProvider) GetExternalMetric

func (p *KedaProvider) GetExternalMetric(namespace string, metricSelector labels.Selector, info provider.ExternalMetricInfo) (*external_metrics.ExternalMetricValueList, error)

GetExternalMetric retrieves metrics from the scalers Metric is normally identified by a name and a set of labels/tags. It is up to a specific implementation how to translate metricSelector to a filter for metric values. Namespace can be used by the implementation for metric identification, access control or ignored.

func (*KedaProvider) GetMetricByName

func (p *KedaProvider) GetMetricByName(name types.NamespacedName, info provider.CustomMetricInfo, metricSelector labels.Selector) (*custom_metrics.MetricValue, error)

GetMetricByName fetches a particular metric for a particular object. The namespace will be empty if the metric is root-scoped.

func (*KedaProvider) GetMetricBySelector

func (p *KedaProvider) GetMetricBySelector(namespace string, selector labels.Selector, info provider.CustomMetricInfo, metricSelector labels.Selector) (*custom_metrics.MetricValueList, error)

GetMetricBySelector fetches a particular metric for a set of objects matching the given label selector. The namespace will be empty if the metric is root-scoped.

func (*KedaProvider) ListAllExternalMetrics

func (p *KedaProvider) ListAllExternalMetrics() []provider.ExternalMetricInfo

ListAllExternalMetrics returns the supported external metrics for this provider

func (*KedaProvider) ListAllMetrics

func (p *KedaProvider) ListAllMetrics() []provider.CustomMetricInfo

ListAllMetrics provides a list of all available metrics at the current time. Note that this is not allowed to return an error, so it is recommended that implementors cache and periodically update this list, instead of querying every time.

Jump to

Keyboard shortcuts

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