[Alerting]: Grafana managed ruler API implementation (#32537)

* [Alerting]: Grafana managed ruler API impl

* Apply suggestions from code review

* fix lint

* Add validation for ruleGroup name length

* Fix MySQL migration

Co-authored-by: kyle <kyle@grafana.com>
This commit is contained in:
Sofia Papagiannaki
2021-04-01 11:11:45 +03:00
committed by GitHub
co-authored by kyle
parent e499585271
commit ee06970d72
19 changed files with 1433 additions and 356 deletions
+2 -1
View File
@@ -44,6 +44,7 @@ type API struct {
DataService *tsdb.Service
Schedule schedule.ScheduleService
Store store.Store
RuleStore store.RuleStore
AlertingStore store.AlertingStore
DataProxy *datasourceproxy.DatasourceProxyService
Alertmanager Alertmanager
@@ -68,7 +69,7 @@ func (api *API) RegisterAPIEndpoints() {
api.RegisterRulerApiEndpoints(NewForkedRuler(
api.DatasourceCache,
NewLotexRuler(proxy, logger),
RulerApiMock{log: logger},
RulerSrv{store: api.RuleStore, log: logger},
))
api.RegisterTestingApiEndpoints(TestingApiMock{log: logger})