Documentation
¶
Index ¶
- type Prometheus
- func (p *Prometheus) CanHandleSelector(labels entities.Selector) bool
- func (p *Prometheus) ComputeObjective(o *entities.Objective, from time.Time, to time.Time) (*entities.Indicator, error)
- func (p *Prometheus) ComputeSloFromPrometheusQuery(query string, from time.Time, to time.Time) (float64, error)
- func (prom *Prometheus) ResourceFromSelector(labels entities.Selector) string
- func (p *Prometheus) RunPrometheusQuery(query string, from time.Time, to time.Time) (model.Value, error)
- type PrometheusAPI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Prometheus ¶
type Prometheus struct {
prometheus.Client
}
func NewPrometheus ¶
func NewPrometheus() (*Prometheus, error)
func (*Prometheus) CanHandleSelector ¶
func (p *Prometheus) CanHandleSelector(labels entities.Selector) bool
CanHandleSelector returns true only if both prometheus query/url are defined
func (*Prometheus) ComputeObjective ¶
func (*Prometheus) ComputeSloFromPrometheusQuery ¶ added in v0.42.1
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
Click to show internal directories.
Click to hide internal directories.