run starts the notifier. This function doesn't block and returns immediately.
()
| 58 | |
| 59 | // run starts the notifier. This function doesn't block and returns immediately. |
| 60 | func (rn *rulerNotifier) run() { |
| 61 | rn.wg.Add(2) |
| 62 | go func() { |
| 63 | if err := rn.sdManager.Run(); err != nil { |
| 64 | level.Error(rn.logger).Log("msg", "error starting notifier discovery manager", "err", err) |
| 65 | } |
| 66 | rn.wg.Done() |
| 67 | }() |
| 68 | go func() { |
| 69 | rn.notifier.Run(rn.sdManager.SyncCh()) |
| 70 | rn.wg.Done() |
| 71 | }() |
| 72 | } |
| 73 | |
| 74 | func (rn *rulerNotifier) applyConfig(cfg *config.Config) error { |
| 75 | if err := rn.notifier.ApplyConfig(cfg); err != nil { |