mock

package
v0.12.1 Latest Latest
Warning

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

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

Documentation

Overview

Package mock implements the external provider interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
	GetExternalMetricFunc      func(ctx context.Context, namespace string, metricSelector labels.Selector, info provider.ExternalMetricInfo) (*external_metrics.ExternalMetricValueList, error) //nolint:lll // External interface requirement.
	ListAllExternalMetricsFunc func() []provider.ExternalMetricInfo
}

Provider holds the config of the provider.

func (*Provider) GetExternalMetric

func (p *Provider) GetExternalMetric(ctx context.Context, namespace string, metricSelector labels.Selector, info provider.ExternalMetricInfo) (*external_metrics.ExternalMetricValueList, error)

GetExternalMetric implemented from external provider interface.

func (*Provider) ListAllExternalMetrics

func (p *Provider) ListAllExternalMetrics() []provider.ExternalMetricInfo

ListAllExternalMetrics implemented from external provider interface.

Jump to

Keyboard shortcuts

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