Files
grafana/pkg/services/ngalert/fetcher.go
T
Sofia Papagiannaki bd2390c49f AlertingNG: code refactoring (#30787)
* AlertingNG: refactoring

* Fix tests
2021-03-03 17:52:19 +02:00

16 lines
315 B
Go

package ngalert
import (
"time"
)
func (sch *schedule) fetchAllDetails(now time.Time) []*AlertDefinition {
q := listAlertDefinitionsQuery{}
err := sch.store.getAlertDefinitions(&q)
if err != nil {
sch.log.Error("failed to fetch alert definitions", "now", now, "err", err)
return nil
}
return q.Result
}