| 46 | } |
| 47 | |
| 48 | func newRulerNotifier(o *notifier.Options, nameValidationScheme model.ValidationScheme, l gklog.Logger, registerer prometheus.Registerer, sdMetrics map[string]discovery.DiscovererMetrics) *rulerNotifier { |
| 49 | sdCtx, sdCancel := context.WithCancel(context.Background()) |
| 50 | slogger := util_log.GoKitLogToSlog(l) |
| 51 | return &rulerNotifier{ |
| 52 | notifier: notifier.NewManager(o, nameValidationScheme, slogger), |
| 53 | sdCancel: sdCancel, |
| 54 | sdManager: discovery.NewManager(sdCtx, slogger, registerer, sdMetrics), |
| 55 | logger: l, |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | // run starts the notifier. This function doesn't block and returns immediately. |
| 60 | func (rn *rulerNotifier) run() { |