resource

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2022 License: Apache-2.0 Imports: 12 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
	Tolerance  float64
}

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

func (*Evaluate) Evaluate

func (e *Evaluate) Evaluate(currentReplicas int32, gatheredMetric *metrics.Metric) (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
	PodLister                     corelisters.PodLister
	CPUInitializationPeriod       time.Duration
	DelayOfInitialReadinessStatus time.Duration
}

Gather (Resource) provides functionality for retrieving metrics for resource metric specs.

func (*Gather) Gather

func (c *Gather) Gather(resourceName corev1.ResourceName, namespace string, podSelector labels.Selector) (*resource.Metric, error)

Gather retrieves a resource metric

func (*Gather) GatherRaw

func (c *Gather) GatherRaw(resourceName corev1.ResourceName, namespace string, podSelector labels.Selector) (*resource.Metric, error)

GatherRaw retrieves a a raw resource metric

Jump to

Keyboard shortcuts

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