Alerting: Update state history service to filter states transitions (#58863)

* rename the method to better reflect its behavior
* make historian filter transition on itself
* call historian with all changes
This commit is contained in:
Yuri Tseretyan
2022-12-06 12:33:15 -05:00
committed by GitHub
parent 18d09cd3fe
commit a85adeed96
6 changed files with 120 additions and 25 deletions

View File

@@ -49,7 +49,7 @@ func (f *FakeRuleReader) ListAlertRules(_ context.Context, q *models.ListAlertRu
type FakeHistorian struct{}
func (f *FakeHistorian) RecordStates(ctx context.Context, rule *models.AlertRule, states []StateTransition) {
func (f *FakeHistorian) RecordStatesAsync(ctx context.Context, rule *models.AlertRule, states []StateTransition) {
}
// NotAvailableImageService is a service that returns ErrScreenshotsUnavailable.