prometheus

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Prometheus

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

func NewPrometheus

func NewPrometheus() (*Prometheus, error)

func (*Prometheus) CanHandleSelector

func (prom *Prometheus) CanHandleSelector(labels entities.Selector) bool

CanHandleSelector returns true only if both prometheus query/url are defined

func (*Prometheus) Close

func (prom *Prometheus) Close() error

Nothing to do for Prometheus...

func (*Prometheus) ComputeObjective

func (prom *Prometheus) ComputeObjective(o *entities.Objective, from time.Time, to time.Time) (*entities.Indicator, error)

func (*Prometheus) ResourceFromSelector

func (prom *Prometheus) ResourceFromSelector(labels entities.Selector) string

No resource identifier can be found, this is part of prom env vars as we are running queries to Prometheus api

type PrometheusAPI

type PrometheusAPI interface {
	RunPrometheusQuery(query string, url string, from time.Time, to time.Time) (model.Value, error)
	ComputeSloFromPrometheusQuery(query string, url string, from time.Time, to time.Time) (float64, error)
}

Jump to

Keyboard shortcuts

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