custom_metrics

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2018 License: Apache-2.0, Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomMetricsClient

type CustomMetricsClient interface {
	RootScopedMetricsGetter
	NamespacedMetricsGetter
}

CustomMetricsClient is a client for fetching metrics describing both root-scoped and namespaced resources.

func New

func NewForConfig

func NewForConfig(c *rest.Config) (CustomMetricsClient, error)

func NewForConfigOrDie

func NewForConfigOrDie(c *rest.Config) CustomMetricsClient

func NewForMapper

func NewForMapper(client rest.Interface, mapper meta.RESTMapper) CustomMetricsClient

NewForMapper constructs the client with a RESTMapper, which allows more accurate translation from GroupVersionKind to GroupVersionResource.

type MetricsInterface

type MetricsInterface interface {
	// GetForObject fetchs the given metric describing the given object.
	GetForObject(groupKind schema.GroupKind, name string, metricName string) (*v1beta1.MetricValue, error)

	// GetForObjects fetches the given metric describing all objects of the given
	// type matching the given label selector (or simply all objects of the given type
	// if the selector is nil).
	GetForObjects(groupKind schema.GroupKind, selector labels.Selector, metricName string) (*v1beta1.MetricValueList, error)
}

MetricsInterface provides access to metrics describing Kubernetes objects.

type NamespacedMetricsGetter

type NamespacedMetricsGetter interface {
	NamespacedMetrics(namespace string) MetricsInterface
}

NamespacedMetricsGetter provides access to an interface for fetching metrics describing resources in a particular namespace.

type RootScopedMetricsGetter

type RootScopedMetricsGetter interface {
	RootScopedMetrics() MetricsInterface
}

RootScopedMetricsGetter provides access to an interface for fetching metrics describing root-scoped objects. Note that metrics describing a namespace are simply considered a special case of root-scoped metrics.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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