grafana/pkg/services/ngalert/schedule
gotjosh 1c3ce0735f
Alerting: Tiny refactor on the eval and schedule packages (#66130)
* Alerting: Tiny refactor on the eval and schedule packages

two very small things:

- We had a constructor on something called a `Context` which is not a `context.Context` so let's just name that constructor `NewContext`
- The user that we use to run query evaluations is the same (with some variation) abstract it to a function so that it can be re-used when necessary.

* Update pkg/services/ngalert/schedule/schedule.go

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>

* Update pkg/services/ngalert/schedule/schedule.go

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>

---------

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2023-04-06 16:02:28 +01:00
..
alerts_sender_mock.go Chore: Fix goimports grouping in alerting (#62424) 2023-01-30 09:55:35 +01:00
compat_test.go Alerting: Update to alerting 20230203015918-0e4e2675d7aa (after refactoring) (#62823) 2023-02-03 11:36:49 -05:00
compat.go Alerting: Update to alerting 20230203015918-0e4e2675d7aa (after refactoring) (#62823) 2023-02-03 11:36:49 -05:00
fetcher_test.go Alerting: Scheduler to use AlertRule (#52354) 2022-07-26 09:40:06 -04:00
fetcher.go Alerting: Update scheduler to get updates only from database (#64635) 2023-03-14 18:02:51 -04:00
registry_test.go Alerting: Update scheduler to get updates only from database (#64635) 2023-03-14 18:02:51 -04:00
registry.go Alerting: Update scheduler to get updates only from database (#64635) 2023-03-14 18:02:51 -04:00
schedule_unit_test.go Alerting: Update scheduler to get updates only from database (#64635) 2023-03-14 18:02:51 -04:00
schedule.go Alerting: Tiny refactor on the eval and schedule packages (#66130) 2023-04-06 16:02:28 +01:00
testing.go Alerting: update test TestAlertingTicker to not rely on clock (#58544) 2022-11-09 15:08:57 -05:00