Documentation
¶
Overview ¶
Package fswatch provies Watch(), a utility function to watch a filesystem path.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Watch ¶
func Watch(logger *logrus.Entry, path string, batchFor time.Duration, processEvent func()) (func(), error)
Watch watches the filesystem path `path`. When anything changes, changes are batched for the period `batchFor`, then `processEvent` is called.
Returns a cancel() function to terminate the watch.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.