()
| 87 | } |
| 88 | |
| 89 | func DrainWatcher() { |
| 90 | if !watcherIsActive.Load() { |
| 91 | return |
| 92 | } |
| 93 | |
| 94 | watcherIsActive.Store(false) |
| 95 | |
| 96 | if globalLogger.Enabled(globalCtx, slog.LevelDebug) { |
| 97 | globalLogger.LogAttrs(globalCtx, slog.LevelDebug, "stopping watcher") |
| 98 | } |
| 99 | |
| 100 | activeWatcher.stopWatching() |
| 101 | reloadWaitGroup.Wait() |
| 102 | activeWatcher = nil |
| 103 | } |
| 104 | |
| 105 | // TODO: how to test this? |
| 106 | func (p *pattern) retryWatching() { |
no test coverage detected