Documentation ¶
Index ¶
- Variables
- type IRoundTripper
- type KeptnPrometheusProvider
- func (r *KeptnPrometheusProvider) EvaluateQuery(ctx context.Context, metric metricsapi.KeptnMetric, ...) (string, []byte, error)
- func (r *KeptnPrometheusProvider) EvaluateQueryForStep(ctx context.Context, metric metricsapi.KeptnMetric, ...) ([]string, []byte, error)
- func (r *KeptnPrometheusProvider) FetchAnalysisValue(ctx context.Context, query string, analysis metricsapi.Analysis, ...) (string, error)
- type RoundTripperRetriever
- type SecretData
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 ¶
func (r *KeptnPrometheusProvider) EvaluateQuery(ctx context.Context, metric metricsapi.KeptnMetric, provider metricsapi.KeptnMetricsProvider) (string, []byte, error)
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 ¶
func (r RoundTripperRetriever) GetRoundTripper(ctx context.Context, provider metricsapi.KeptnMetricsProvider, k8sClient client.Client) (http.RoundTripper, error)
type SecretData ¶
Click to show internal directories.
Click to hide internal directories.