MCPcopy Index your code
hub / github.com/cortexproject/cortex / applyConfig

Method applyConfig

pkg/ruler/notifier.go:74–84  ·  view source on GitHub ↗
(cfg *config.Config)

Source from the content-addressed store, hash-verified

72}
73
74func (rn *rulerNotifier) applyConfig(cfg *config.Config) error {
75 if err := rn.notifier.ApplyConfig(cfg); err != nil {
76 return err
77 }
78
79 sdCfgs := make(map[string]discovery.Configs)
80 for k, v := range cfg.AlertingConfig.AlertmanagerConfigs.ToMap() {
81 sdCfgs[k] = v.ServiceDiscoveryConfigs
82 }
83 return rn.sdManager.ApplyConfig(sdCfgs)
84}
85
86func (rn *rulerNotifier) stop() {
87 rn.sdCancel()

Callers 2

getOrCreateNotifierMethod · 0.80

Calls 1

ApplyConfigMethod · 0.80

Tested by

no test coverage detected