grafana/pkg/services/ngalert/state
gotjosh a86ad1190c
Alerting: Refactor state manager as a dependency (#36513)
* Alerting: Refactor state manager as a dependency

Within the scheduler, the state manager was being passed around a
certain number of functions. I've introduced it as a dependency to keep
the "service" interfaces as clean and homogeneous as possible.

This is relevant, because I'm going to introduce live reload of these
components as part of my next PR and it is better if dependencies are
self-contained.

* remove unused functions

* Fix a few more tests

* Make sure the `stateManager` is declared before the schedule
2021-07-07 17:18:31 +01:00
..
cache.go Alerting: Fill the empty GeneratorURL (#35740) 2021-06-16 15:34:12 +05:30
manager_test.go Alerting: Refactor state manager as a dependency (#36513) 2021-07-07 17:18:31 +01:00
manager.go Alerting: Refactor state manager as a dependency (#36513) 2021-07-07 17:18:31 +01:00
state_test.go Alerting: recalculate EndsAt (#35830) 2021-06-17 10:01:46 -07:00
state.go Alerting: recalculate EndsAt (#35830) 2021-06-17 10:01:46 -07:00