Alerting: Add SaveAlertInstancesForRule instance store method (#94505)

Alerting: Add SaveAlertInstancesForRule method to the InstanceStore interface
This commit is contained in:
Alexander Akhmetov
2024-10-11 13:47:44 +02:00
committed by GitHub
parent e2672021bc
commit 0a4e6ff86b
10 changed files with 85 additions and 29 deletions
+8
View File
@@ -587,6 +587,14 @@ func GenerateRuleKey(orgID int64) AlertRuleKey {
}
}
// GenerateRuleKeyWithGroup generates a random alert rule key with group
func GenerateRuleKeyWithGroup(orgID int64) AlertRuleKeyWithGroup {
return AlertRuleKeyWithGroup{
AlertRuleKey: GenerateRuleKey(orgID),
RuleGroup: util.GenerateShortUID(),
}
}
// GenerateGroupKey generates a random group key
func GenerateGroupKey(orgID int64) AlertRuleGroupKey {
return AlertRuleGroupKey{