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 11:22:28 -07:00
|
|
|
import "github.com/fsnotify/fsnotify"
|
2016-02-23 21:05:16 -05:00
|
|
|
|
2017-05-21 23:24:07 +00: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 13:07:35 +08: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 13:07:35 +08: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
|
|
|
|
}
|