Stop stops the file watcher
()
| 126 | |
| 127 | // Stop stops the file watcher |
| 128 | func (w *Watcher) Stop() error { |
| 129 | w.stopped.Store(true) |
| 130 | w.stopDispatch() |
| 131 | w.stopConfigReloadTimer() |
| 132 | w.stopServerUpdateTimer() |
| 133 | return w.watcher.Close() |
| 134 | } |
| 135 | |
| 136 | // SetConfig updates the current configuration |
| 137 | func (w *Watcher) SetConfig(cfg *config.Config) { |