(_ error)
| 182 | } |
| 183 | |
| 184 | func (w *querierWorker) stopping(_ error) error { |
| 185 | // Stop all goroutines fetching queries. Note that in Stopping state, |
| 186 | // worker no longer creates new managers in AddressAdded method. |
| 187 | w.mu.Lock() |
| 188 | for _, m := range w.managers { |
| 189 | m.stop() |
| 190 | } |
| 191 | w.mu.Unlock() |
| 192 | |
| 193 | if w.subservices == nil { |
| 194 | return nil |
| 195 | } |
| 196 | |
| 197 | // Stop DNS watcher and services used by processor. |
| 198 | return services.StopManagerAndAwaitStopped(context.Background(), w.subservices) |
| 199 | } |
| 200 | |
| 201 | func (w *querierWorker) AddressAdded(address string) { |
| 202 | ctx := w.ServiceContext() |
nothing calls this directly
no test coverage detected