MCPcopy Create free account
hub / github.com/cortexproject/cortex / clusterWait

Function clusterWait

pkg/alertmanager/alertmanager.go:348–352  ·  view source on GitHub ↗

clusterWait returns a function that inspects the current peer state and returns a duration of one base timeout for each peer with a higher ID than ourselves.

(position func() int, timeout time.Duration)

Source from the content-addressed store, hash-verified

346// clusterWait returns a function that inspects the current peer state and returns
347// a duration of one base timeout for each peer with a higher ID than ourselves.
348func clusterWait(position func() int, timeout time.Duration) func() time.Duration {
349 return func() time.Duration {
350 return time.Duration(position()) * timeout
351 }
352}
353
354// ApplyConfig applies a new configuration to an Alertmanager.
355func (am *Alertmanager) ApplyConfig(userID string, conf *config.Config, rawCfg string) error {

Callers 1

ApplyConfigMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected