Alerting: add collision safe update function for alertmanager configurations (#46692)

* Alerting: add collision safe update function for alertmanager configurations

* fix typo

* use bootstrap func for tests

* move hash calculation to store

* remove icons lol

* remove removed field
This commit is contained in:
Jean-Philippe Quéméner
2022-03-23 09:31:46 +01:00
committed by GitHub
parent ff3c1e3144
commit a80f04c949
6 changed files with 141 additions and 0 deletions

View File

@@ -22,6 +22,7 @@ type AlertingStore interface {
GetAllLatestAlertmanagerConfiguration(ctx context.Context) ([]*models.AlertConfiguration, error)
SaveAlertmanagerConfiguration(ctx context.Context, cmd *models.SaveAlertmanagerConfigurationCmd) error
SaveAlertmanagerConfigurationWithCallback(ctx context.Context, cmd *models.SaveAlertmanagerConfigurationCmd, callback SaveCallback) error
UpdateAlertManagerConfiguration(cmd *models.SaveAlertmanagerConfigurationCmd) error
}
// DBstore stores the alert definitions and instances in the database.