object

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2021 License: Apache-2.0 Imports: 7 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 (Object) provides functionality for retrieving metrics for object metric specs.

func (*Gather) GetMetric

func (c *Gather) GetMetric(metricName string, namespace string, objectRef *autoscaling.CrossVersionObjectReference, selector labels.Selector, metricSelector labels.Selector) (*Metric, error)

GetMetric retrieves an object metric

func (*Gather) GetPerPodMetric

func (c *Gather) GetPerPodMetric(metricName string, namespace string, objectRef *autoscaling.CrossVersionObjectReference, metricSelector labels.Selector) (*Metric, error)

GetPerPodMetric retrieves an object per pod metric

type Gatherer

type Gatherer interface {
	GetMetric(metricName string, namespace string, objectRef *autoscaling.CrossVersionObjectReference, selector labels.Selector, metricSelector labels.Selector) (*Metric, error)
	GetPerPodMetric(metricName string, namespace string, objectRef *autoscaling.CrossVersionObjectReference, metricSelector labels.Selector) (*Metric, error)
}

Gatherer (Object) allows retrieval of object metrics.

type Metric

type Metric struct {
	Current       value.MetricValue
	ReadyPodCount *int64
	Timestamp     time.Time
}

Metric (Object) is a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).

Jump to

Keyboard shortcuts

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