Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultWaitTimeout = 100 * time.Millisecond
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct { // Path is the list of files or directories to watch // It is the caller's responsibility to ensure that paths are absolute. Path []string // Direct is the flag to watch the file directly if file will never be removed Direct bool // Callback is the function to call when a file is updated Callback func(path string) // WaitTimeout is the time to wait write events before calling the callback // DefaultWaitTimeout is used by default WaitTimeout time.Duration // Logger is the logger to log errors // optional Logger logger.Logger }
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
Watcher is a simple fsnotify wrapper to watch updates correctly.
func NewWatcher ¶
Click to show internal directories.
Click to hide internal directories.