Versions in this module Expand all Collapse all v0 v0.9.0 Apr 8, 2019 Changes in this version + func GetFileParts(filePath string) (parentDir string, absPath string, err error) + type EventHandler func(source string, diff []byte) + type EventSource interface + OnSourceEvent func(handler EventHandler) + Trigger func(diff []byte) + func NewFileSource(filePath string) EventSource + type FSNotifyEventSource struct + AbsFilePath string + ParentDir string + func (s *FSNotifyEventSource) AttachToWatcher(watcher *fsnotify.Watcher) error + func (s *FSNotifyEventSource) DetachFromWatcher(watcher *fsnotify.Watcher) error + type FSNotifyWatcher struct + func (f *FSNotifyWatcher) AddSource(source string, eventSource EventSource) (EventSource, error) + func (f *FSNotifyWatcher) RemoveSource(source string) error + func (f *FSNotifyWatcher) Start() error + func (f *FSNotifyWatcher) Stop() error + type GenericEventSource struct + FilePath string + func NewEventSource(filePath string) *GenericEventSource + func (g *GenericEventSource) OnSourceEvent(handler EventHandler) + func (g *GenericEventSource) Trigger(diff []byte) + type WatchDaemon interface + AddSource func(source string, eventSource EventSource) (EventSource, error) + RemoveSource func(source string) error + Start func() error + Stop func() error + func NewWatchDaemon() WatchDaemon