type Watcher … type watcher … func (w *watcher) EventChan() chan *Event { … } func (w *watcher) StartIndex() uint64 { … } // notify function notifies the watcher. If the watcher interests in the given path, // the function will return true. func (w *watcher) notify(e *Event, originalPath bool, deleted bool) bool { … } // Remove removes the watcher from watcherHub // The actual remove function is guaranteed to only be executed once func (w *watcher) Remove() { … } type nopWatcher … func NewNopWatcher() Watcher { … } func (w *nopWatcher) EventChan() chan *Event { … } func (w *nopWatcher) StartIndex() uint64 { … } func (w *nopWatcher) Remove() { … }