Stop stops watching the PRD file.
()
| 73 | |
| 74 | // Stop stops watching the PRD file. |
| 75 | func (w *Watcher) Stop() { |
| 76 | w.mu.Lock() |
| 77 | if !w.running { |
| 78 | w.mu.Unlock() |
| 79 | return |
| 80 | } |
| 81 | w.running = false |
| 82 | w.mu.Unlock() |
| 83 | |
| 84 | close(w.done) |
| 85 | w.watcher.Close() |
| 86 | } |
| 87 | |
| 88 | // Events returns the channel for receiving PRD change events. |
| 89 | func (w *Watcher) Events() <-chan WatcherEvent { |
no outgoing calls