Documentation
¶
Overview ¶
Package filewatch coalesces filesystem notifications for mounted configuration files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
Watcher watches the parent directories of a set of files. Watching directories, rather than resolved file targets, preserves notifications when Kubernetes swaps a projected volume's ..data symlink.
func New ¶
func New(paths []string, debounce, maxDebounce time.Duration, onChange func(), onError func(error)) (*Watcher, error)
New starts a watcher. Events are delayed until debounce has elapsed without a new event, but a continuous burst is delivered no later than maxDebounce after its first event. onError receives watcher errors; it must not assume an error is fatal. Paths are used only to select and deduplicate their parent directories.
Click to show internal directories.
Click to hide internal directories.