Versions in this module Expand all Collapse all v3 v3.0.0 Mar 21, 2024 Changes in this version + type Evaluator struct + External ExternalEvaluater + Object ObjectEvaluater + Pods PodsEvaluater + Resource ResourceEvaluater + Tolerance float64 + func NewEvaluator(tolerance float64) *Evaluator + func (e *Evaluator) Evaluate(gatheredMetrics []*metrics.Metric, currentReplicas int32) (int32, error) + func (e *Evaluator) EvaluateSingleMetric(gatheredMetric *metrics.Metric, currentReplicas int32) (int32, error) + func (e *Evaluator) EvaluateSingleMetricWithOptions(gatheredMetric *metrics.Metric, currentReplicas int32, tolerance float64) (int32, error) + func (e *Evaluator) EvaluateWithOptions(gatheredMetrics []*metrics.Metric, currentReplicas int32, tolerance float64) (int32, error) + type EvaluatorMultiMetricError struct + Errors []error + Partial bool + func (e *EvaluatorMultiMetricError) Error() string + type ExternalEvaluater interface + Evaluate func(currentReplicas int32, gatheredMetric *metrics.Metric, tolerance float64) (int32, error) + type ExternalGatherer interface + Gather func(metricName, namespace string, metricSelector *metav1.LabelSelector, ...) (*externalmetrics.Metric, error) + GatherPerPod func(metricName, namespace string, metricSelector *metav1.LabelSelector) (*externalmetrics.Metric, error) + type Gatherer struct + CPUInitializationPeriod time.Duration + DelayOfInitialReadinessStatus time.Duration + External ExternalGatherer + Object ObjectGatherer + Pods PodsGatherer + Resource ResourceGatherer + ScaleClient k8sscale.ScalesGetter + func NewGatherer(metricsclient metricsclient.Client, podlister corelisters.PodLister, ...) *Gatherer + func (c *Gatherer) Gather(specs []autoscalingv2.MetricSpec, namespace string, ...) ([]*metrics.Metric, error) + func (c *Gatherer) GatherSingleMetric(spec autoscalingv2.MetricSpec, namespace string, podSelector labels.Selector) (*metrics.Metric, error) + func (c *Gatherer) GatherSingleMetricWithOptions(spec autoscalingv2.MetricSpec, namespace string, podSelector labels.Selector, ...) (*metrics.Metric, error) + func (c *Gatherer) GatherWithOptions(specs []autoscalingv2.MetricSpec, namespace string, ...) ([]*metrics.Metric, error) + type GathererMultiMetricError struct + Errors []error + Partial bool + func (e *GathererMultiMetricError) Error() string + type ObjectEvaluater interface + Evaluate func(currentReplicas int32, gatheredMetric *metrics.Metric, tolerance float64) (int32, error) + type ObjectGatherer interface + Gather func(metricName string, namespace string, ...) (*objectmetrics.Metric, error) + GatherPerPod func(metricName string, namespace string, ...) (*objectmetrics.Metric, error) + type PodsEvaluater interface + Evaluate func(currentReplicas int32, gatheredMetric *metrics.Metric) int32 + type PodsGatherer interface + Gather func(metricName string, namespace string, podSelector labels.Selector, ...) (*podsmetrics.Metric, error) + type ResourceEvaluater interface + Evaluate func(currentReplicas int32, gatheredMetric *metrics.Metric, tolerance float64) (int32, error) + type ResourceGatherer interface + Gather func(resourceName corev1.ResourceName, namespace string, ...) (*resourcemetrics.Metric, error) + GatherRaw func(resourceName corev1.ResourceName, namespace string, ...) (*resourcemetrics.Metric, error) Other modules containing this package github.com/jthomperoo/k8shorizmetrics github.com/jthomperoo/k8shorizmetrics/v2 github.com/jthomperoo/k8shorizmetrics/v4