metricget

package
v2.11.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package metricget provides functionality for managing gathering metrics, calling external metric gathering logic through shell commands with relevant data piped to them.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gatherer

type Gatherer struct {
	Clientset         kubernetes.Interface
	Config            *config.Config
	Execute           execute.Executer
	K8sMetricGatherer K8sMetricGatherer
}

Gatherer handles triggering the metric gathering logic to gather metrics for a resource

func (*Gatherer) GetMetrics

func (m *Gatherer) GetMetrics(info metric.Info, podSelector labels.Selector, currentReplicas int32) ([]*metric.ResourceMetric, error)

GetMetrics gathers metrics for the resource supplied

type GetMetricer

type GetMetricer interface {
	GetMetrics(info metric.Info, podSelector labels.Selector, currentReplicas int32) ([]*metric.ResourceMetric, error)
}

GetMetricer provides methods for retrieving metrics

type K8sMetricGatherer added in v2.7.0

type K8sMetricGatherer interface {
	Gather(specs []autoscalingv2.MetricSpec, namespace string, podSelector labels.Selector) ([]*metrics.Metric, error)
}

Jump to

Keyboard shortcuts

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