provider

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2019 License: MIT Imports: 18 Imported by: 1

Documentation

Overview

Package provider is the implementation of custom metric and external metric apis see https://github.com/kubernetes/community/blob/master/contributors/design-proposals/instrumentation/custom-metrics-api.md#api-paths

Package provider is the implementation of custom metric and external metric apis see https://github.com/kubernetes/community/blob/master/contributors/design-proposals/instrumentation/custom-metrics-api.md#api-paths

Package provider is the implementation of custom metric and external metric apis see https://github.com/kubernetes/community/blob/master/contributors/design-proposals/instrumentation/custom-metrics-api.md#api-paths

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAzureProvider

func NewAzureProvider(defaultSubscriptionID string, mapper apimeta.RESTMapper, kubeClient dynamic.Interface, appinsightsClient custommetrics.AzureAppInsightsClient, azureClientFactory externalmetrics.AzureClientFactory, metricCache *metriccache.MetricCache) provider.MetricsProvider

Types

type AzureProvider

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

func (*AzureProvider) GetExternalMetric

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

GetExternalMetric retrieves metrics from Azure Monitor Endpoint 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 (*AzureProvider) GetMetricByName added in v0.4.0

func (p *AzureProvider) 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 (*AzureProvider) GetMetricBySelector added in v0.4.0

func (p *AzureProvider) 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 (*AzureProvider) ListAllExternalMetrics

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

ListAllExternalMetrics calls out to azure and builds a list of metrics that can be queried against

func (*AzureProvider) ListAllMetrics

func (p *AzureProvider) 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 reccomended 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