external

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gather

type Gather struct {
	MetricsClient   metricsclient.MetricsClient
	PodReadyCounter podutil.PodReadyCounter
}

Gather (External) provides functionality for retrieving metrics for external metric specs.

func (*Gather) GetMetric

func (c *Gather) GetMetric(metricName, namespace string, metricSelector *metav1.LabelSelector, podSelector labels.Selector) (*Metric, error)

GetMetric retrieves an external metric

func (*Gather) GetPerPodMetric

func (c *Gather) GetPerPodMetric(metricName, namespace string, metricSelector *metav1.LabelSelector) (*Metric, error)

GetPerPodMetric retrieves an external per pod metric

type Gatherer

type Gatherer interface {
	GetMetric(metricName, namespace string, metricSelector *metav1.LabelSelector, podSelector labels.Selector) (*Metric, error)
	GetPerPodMetric(metricName, namespace string, metricSelector *metav1.LabelSelector) (*Metric, error)
}

Gatherer (External) allows retrieval of external metrics.

type Metric

type Metric struct {
	Utilization   int64
	ReadyPodCount *int64
	Timestamp     time.Time
}

Metric (External) is a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).

Jump to

Keyboard shortcuts

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