metricsclient

package
v0.10.8 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMetricsClient

func NewMetricsClient(logger logger.Logger,
	restConfig *rest.Config,
	autoScalerConf scalertypes.AutoScalerOptions) (scalertypes.MetricsClient, error)

Types

type K8sCustomMetricsClient

type K8sCustomMetricsClient struct {
	k8scustommetrics.CustomMetricsClient
	// contains filtered or unexported fields
}

func NewCustomMetricsClient

func NewCustomMetricsClient(
	parentLogger logger.Logger,
	restConfig *rest.Config,
	namespace string,
	groupKind schema.GroupKind) (*K8sCustomMetricsClient, error)

func (*K8sCustomMetricsClient) GetResourceMetrics

func (cmw *K8sCustomMetricsClient) GetResourceMetrics(resources []scalertypes.Resource) (map[string]map[string]int, error)

type PrometheusMetricsClient

type PrometheusMetricsClient struct {
	// contains filtered or unexported fields
}

PrometheusMetricsClient implements MetricsClient interface using Prometheus as the backend

func NewPrometheusClient

func NewPrometheusClient(parentLogger logger.Logger, prometheusURL, namespace string, templates []scalertypes.QueryTemplate, interval time.Duration) (*PrometheusMetricsClient, error)

NewPrometheusClient creates a new PrometheusMetricsClient instance

func (*PrometheusMetricsClient) GetResourceMetrics

func (pc *PrometheusMetricsClient) GetResourceMetrics(resources []scalertypes.Resource) (map[string]map[string]int, error)

GetResourceMetrics retrieves metrics for multiple resources

Jump to

Keyboard shortcuts

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