Refactor time durations (#58484)

This change uses `time.Second` in place of `1000 * time.Millisecond` and `time.Minute` in place of `60*time.Second`.
This commit is contained in:
Sasha Melentyev
2022-11-22 10:09:15 +03:00
committed by GitHub
parent 6ac43c9cb4
commit c02003af3c
18 changed files with 43 additions and 43 deletions

View File

@@ -20,7 +20,7 @@ const (
alertmanagerDefaultPeerTimeout = 15 * time.Second
alertmanagerDefaultGossipInterval = cluster.DefaultGossipInterval
alertmanagerDefaultPushPullInterval = cluster.DefaultPushPullInterval
alertmanagerDefaultConfigPollInterval = 60 * time.Second
alertmanagerDefaultConfigPollInterval = time.Minute
// To start, the alertmanager needs at least one route defined.
// TODO: we should move this to Grafana settings and define this as the default.
alertmanagerDefaultConfiguration = `{
@@ -45,7 +45,7 @@ const (
}
`
evaluatorDefaultEvaluationTimeout = 30 * time.Second
schedulerDefaultAdminConfigPollInterval = 60 * time.Second
schedulerDefaultAdminConfigPollInterval = time.Minute
schedulereDefaultExecuteAlerts = true
schedulerDefaultMaxAttempts = 3
schedulerDefaultLegacyMinInterval = 1