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