2018-02-05 21:05:59 +00:00
|
|
|
package filenotify // import "github.com/docker/docker/pkg/filenotify"
|
2016-02-24 02:05:16 +00:00
|
|
|
|
2016-10-31 18:22:28 +00:00
|
|
|
import "github.com/fsnotify/fsnotify"
|
2016-02-24 02:05:16 +00:00
|
|
|
|
2017-05-21 23:24:07 +00:00
|
|
|
// fsNotifyWatcher wraps the fsnotify package to satisfy the FileNotifier interface
|
2016-02-24 02:05:16 +00:00
|
|
|
type fsNotifyWatcher struct {
|
|
|
|
*fsnotify.Watcher
|
|
|
|
}
|
|
|
|
|
2016-07-24 05:07:35 +00:00
|
|
|
// Events returns the fsnotify event channel receiver
|
2016-02-24 02:05:16 +00:00
|
|
|
func (w *fsNotifyWatcher) Events() <-chan fsnotify.Event {
|
|
|
|
return w.Watcher.Events
|
|
|
|
}
|
|
|
|
|
2016-07-24 05:07:35 +00:00
|
|
|
// Errors returns the fsnotify error channel receiver
|
2016-02-24 02:05:16 +00:00
|
|
|
func (w *fsNotifyWatcher) Errors() <-chan error {
|
|
|
|
return w.Watcher.Errors
|
|
|
|
}
|