Add context.Context to AlertingStore (#45069)

This commit is contained in:
George Robinson
2022-02-09 09:22:09 +00:00
committed by GitHub
parent 069f772c6f
commit 4e3a72fc2a
9 changed files with 43 additions and 29 deletions
+3 -3
View File
@@ -32,8 +32,8 @@ type Scheduler interface {
type Alertmanager interface {
// Configuration
SaveAndApplyConfig(config *apimodels.PostableUserConfig) error
SaveAndApplyDefaultConfig() error
SaveAndApplyConfig(ctx context.Context, config *apimodels.PostableUserConfig) error
SaveAndApplyDefaultConfig(ctx context.Context) error
GetStatus() apimodels.GettableStatus
// Silences
@@ -51,7 +51,7 @@ type Alertmanager interface {
}
type AlertingStore interface {
GetLatestAlertmanagerConfiguration(query *models.GetLatestAlertmanagerConfigurationQuery) error
GetLatestAlertmanagerConfiguration(ctx context.Context, query *models.GetLatestAlertmanagerConfigurationQuery) error
}
// API handlers.