Documentation
¶
Overview ¶
Package watcher subscribes to filesystem changes and triggers reloads.
Why parent-directory watching? Kubernetes ConfigMap mounts use a `..data` symlink that is atomically swapped on update. Watching the target file directly loses events because the inode changes; watching the parent directory and reacting to CREATE / CHMOD on the symlink path is the recommended pattern.
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 fans fsnotify events out to a single Trigger callback. It survives best-effort recovery: when a watched directory is deleted (e.g. a pod's volume re-mount), the watcher attempts to re-Add it on the next event.
Click to show internal directories.
Click to hide internal directories.