Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WatchFiles ¶
WatchFiles adds a file watcher to the config extensions. When activated it starts a go routine to check for file changes in the background. If a given file in the paths changes, the config will be instructed to reload. Use the shutdown context to signal when the app is shutting down, to orderly stop the go routine. Use the reporter interface to receive any warnings/errors encountered in the background go routine. This interface also gets notified when a watched path has changed. If the interface is nil, warnings/errors and file changes will be silently discarded.
Types ¶
type WatcherReporter ¶
WatcherReporter represents the interface to report back warnings, errors and changed files.