Alerting: update state manager to return StateTransition instead of State (#58867)
* improve test for stale states * update state manager return StateTransition * update scheduler to accept state transitions
This commit is contained in:
@@ -158,6 +158,12 @@ func WithTitle(title string) AlertRuleMutator {
|
||||
}
|
||||
}
|
||||
|
||||
func WithFor(duration time.Duration) AlertRuleMutator {
|
||||
return func(rule *AlertRule) {
|
||||
rule.For = duration
|
||||
}
|
||||
}
|
||||
|
||||
func GenerateAlertLabels(count int, prefix string) data.Labels {
|
||||
labels := make(data.Labels, count)
|
||||
for i := 0; i < count; i++ {
|
||||
|
||||
Reference in New Issue
Block a user