prometheus

package
v0.0.0-...-9d026b8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidSecretFormat = errors.New("secret key does not contain user and password")
View Source
var ErrSecretKeyRefNotDefined = errors.New("the SecretKeyRef property with the Prometheus API Key is missing")

Functions

This section is empty.

Types

type IRoundTripper

type IRoundTripper interface {
	GetRoundTripper(context.Context, metricsapi.KeptnMetricsProvider, client.Client) (http.RoundTripper, error)
}

type KeptnPrometheusProvider

type KeptnPrometheusProvider struct {
	Log       logr.Logger
	K8sClient client.Client
	Getter    IRoundTripper
}

func NewPrometheusProvider

func NewPrometheusProvider(log logr.Logger, k8sClient client.Client) *KeptnPrometheusProvider

func (*KeptnPrometheusProvider) EvaluateQuery

EvaluateQuery fetches the SLI values from prometheus provider

func (*KeptnPrometheusProvider) EvaluateQueryForStep

func (r *KeptnPrometheusProvider) EvaluateQueryForStep(ctx context.Context, metric metricsapi.KeptnMetric, provider metricsapi.KeptnMetricsProvider) ([]string, []byte, error)

EvaluateQueryForStep fetches the metric values from prometheus provider

func (*KeptnPrometheusProvider) FetchAnalysisValue

func (r *KeptnPrometheusProvider) FetchAnalysisValue(ctx context.Context, query string, analysis metricsapi.Analysis, provider *metricsapi.KeptnMetricsProvider) (string, error)

type RoundTripperRetriever

type RoundTripperRetriever struct {
}

func (RoundTripperRetriever) GetRoundTripper

type SecretData

type SecretData struct {
	User     string        `json:"user"`
	Password config.Secret `json:"password"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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