Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FSWatcher ¶ added in v0.13.0
type FSWatcher struct {
// contains filtered or unexported fields
}
FSWatcher watches for changes to a directory on the filesystem and sends a notification to eventCh every time a file in the folder is changed. Although it's possible to watch for individual files, that's not recommended; watch for the file's parent folder instead. That is because, like in Kubernetes which uses system links on mounted volumes, the file may be deleted and recreated with a different inode. Note that changes are batched for 0.5 seconds before notifications are sent as events on a single file often come in batches.
type Options ¶ added in v0.13.0
type Options struct { // Targets is a list of directories to watch for changes. Targets []string // Interval is the interval to wait before sending a notification after a file has changed. // Default to 500ms. Interval *time.Duration }
Options are the options for the FSWatcher.
Click to show internal directories.
Click to hide internal directories.