Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiscerningListener ¶
type DiscerningListener interface { Listener WatchDir(info os.FileInfo) bool WatchFile(basename string) bool }
DiscerningListener allows the receiver to selectively watch files.
type Listener ¶
type Listener interface { // Refresh is invoked by the watcher on relevant filesystem events. // If the listener returns an error, it is served to the user on the current request. Refresh() *utils.SourceError }
Listener is an interface for receivers of filesystem events.
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
Watcher allows listeners to register to be notified of changes under a given directory.
func NewWatcher ¶
func NewWatcher(paths *model.RevelContainer, eagerRefresh bool) *Watcher
Creates a new watched based on the container.
func (*Watcher) Listen ¶
Listen registers for events within the given root directories (recursively).
func (*Watcher) Notify ¶
func (w *Watcher) Notify() *utils.SourceError
Notify causes the watcher to forward any change events to listeners. It returns the first (if any) error returned.
Click to show internal directories.
Click to hide internal directories.