provider

package
Version: v0.0.0-...-f65ad56 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2021 License: Apache-2.0 Imports: 21 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOperationNotSupportedError

func NewOperationNotSupportedError(operation string) *apierr.StatusError

NewOperationNotSupportedError returns a StatusError indicating that the invoked API call is not supported.

func NewStackdriverProvider

func NewStackdriverProvider(kubeClient *corev1.CoreV1Client, mapper apimeta.RESTMapper, gceConf *config.GceConfig, stackdriverService *stackdriver.Service, translator *translator.Translator, rateInterval time.Duration, useNewResourceModel bool, fallbackForContainerMetrics bool) provider.MetricsProvider

NewStackdriverProvider creates a StackdriverProvider

Types

type StackdriverProvider

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

StackdriverProvider is a provider of custom metrics from Stackdriver.

func (*StackdriverProvider) GetExternalMetric

func (p *StackdriverProvider) GetExternalMetric(ctx context.Context, namespace string, metricSelector labels.Selector, info provider.ExternalMetricInfo) (*external_metrics.ExternalMetricValueList, error)

GetExternalMetric queries Stackdriver for external metrics.

func (*StackdriverProvider) GetMetricByName

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

func (*StackdriverProvider) GetMetricBySelector

func (p *StackdriverProvider) GetMetricBySelector(ctx context.Context, 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 (*StackdriverProvider) ListAllExternalMetrics

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

ListAllExternalMetrics returns a list of available external metrics. Not implemented (currently returns empty list).

func (*StackdriverProvider) ListAllMetrics

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

ListAllMetrics returns all custom metrics available from Stackdriver. List only pod metrics

Jump to

Keyboard shortcuts

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