Fallback to file polling for jsonlog reader on err

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
Brian Goff 2015-10-08 16:55:28 -04:00
parent 55c8a5b21b
commit 2d5e8bce1c
4 changed files with 396 additions and 0 deletions

18
filenotify/fsnotify.go Normal file
View file

@ -0,0 +1,18 @@
package filenotify
import "gopkg.in/fsnotify.v1"
// fsNotify wraps the fsnotify package to satisfy the FileNotifer interface
type fsNotifyWatcher struct {
*fsnotify.Watcher
}
// GetEvents returns the fsnotify event channel receiver
func (w *fsNotifyWatcher) Events() <-chan fsnotify.Event {
return w.Watcher.Events
}
// GetErrors returns the fsnotify error channel receiver
func (w *fsNotifyWatcher) Errors() <-chan error {
return w.Watcher.Errors
}