github.com/demonoid81/moby@v0.0.0-20200517203328-62dd8e17c460/pkg/filenotify/fsnotify.go (about)

     1  package filenotify // import "github.com/demonoid81/moby/pkg/filenotify"
     2  
     3  import "github.com/fsnotify/fsnotify"
     4  
     5  // fsNotifyWatcher wraps the fsnotify package to satisfy the FileNotifier interface
     6  type fsNotifyWatcher struct {
     7  	*fsnotify.Watcher
     8  }
     9  
    10  // Events returns the fsnotify event channel receiver
    11  func (w *fsNotifyWatcher) Events() <-chan fsnotify.Event {
    12  	return w.Watcher.Events
    13  }
    14  
    15  // Errors returns the fsnotify error channel receiver
    16  func (w *fsNotifyWatcher) Errors() <-chan error {
    17  	return w.Watcher.Errors
    18  }