external

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: 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 Evaluate

type Evaluate struct {
	Calculater replicas.Calculator
}

Evaluate (external) calculates a replica count evaluation, using the tolerance and calculater provided

func (*Evaluate) Evaluate

func (e *Evaluate) Evaluate(currentReplicas int32, gatheredMetric *metrics.Metric, tolerance float64) (int32, error)

Evaluate calculates an evaluation based on the metric provided and the current number of replicas

type Gather

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

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

func (*Gather) Gather

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

Gather retrieves an external metric

func (*Gather) GatherPerPod

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

GatherPerPod retrieves an external per pod metric

Jump to

Keyboard shortcuts

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