Documentation ¶
Index ¶
Constants ¶
View Source
const ErrorRate = "error_rate"
View Source
const RequestLatencyP50 = "response_time_p50"
View Source
const RequestLatencyP90 = "response_time_p90"
View Source
const RequestLatencyP95 = "response_time_p95"
View Source
const Throughput = "throughput"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct { ApiURL string Username string Password string Project string Stage string Service string HTTPClient *http.Client CustomFilters []*keptnv2.SLIFilter CustomQueries map[string]string }
Handler interacts with a prometheus API endpoint
func NewPrometheusHandler ¶
func NewPrometheusHandler(apiURL string, project string, stage string, service string, customFilters []*keptnv2.SLIFilter) *Handler
NewPrometheusHandler returns a new prometheus handler that interacts with the Prometheus REST API
func (*Handler) GetSLIValue ¶
func (ph *Handler) GetSLIValue(metric string, start string, end string, logger keptncommon.LoggerInterface) (float64, error)
GetSLIValue retrieves the specified value via the Prometheus API
Click to show internal directories.
Click to hide internal directories.