mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
feat(alerting): add interface for alert backend
This commit is contained in:
parent
69229211b2
commit
0bea0cc5b9
@ -2,9 +2,16 @@ package graphite
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
m "github.com/grafana/grafana/pkg/models"
|
||||
)
|
||||
|
||||
// AlertDatasource is bacon
|
||||
type AlertDatasource interface {
|
||||
GetSeries(job *m.AlertJob) (m.TimeSeriesSlice, error)
|
||||
}
|
||||
|
||||
// GetSeries returns timeseries data from the datasource
|
||||
func GetSeries(job *m.AlertJob) (m.TimeSeriesSlice, error) {
|
||||
if job.Datasource.Type == m.DS_GRAPHITE {
|
||||
return GraphiteClient{}.GetSeries(job)
|
||||
|
Loading…
Reference in New Issue
Block a user