v0.0.0-...-f5e5ee2 Latest Latest

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

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 20 Imported by: 6




This section is empty.


This section is empty.


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, customMetricsListCache []provider.CustomMetricInfo) provider.MetricsProvider

NewStackdriverProvider creates a StackdriverProvider


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 one custom metric to reduce memory usage, when ListFullCustomMetrics is false (by default), Else, it returns all custom metrics available from Stackdriver.

Jump to

Keyboard shortcuts

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