Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Watcher ¶
type Watcher struct {
// Holds the location in which the config file lives
FilePath string
// The function to run when an update on the ConfigMap is applied
OnUpdate func()
// The function to run when an error occurs
OnError func(error)
// The function to run when a fatal error occurs
// When fatal errors occur, the Watcher is NOT running. Therefore, any ConfigMap updates
// will be missed.
OnFatal func(error)
}
Watcher holds details required to watch for ConfigMap updates
func (*Watcher) Run ¶
func (w *Watcher) Run()
Run starts watching for updates to a ConfigMap file
You'll want to call this method in a goroutine or it will block your main thread. RunInBackground is also available for just this purpose.
func (*Watcher) RunInBackground ¶
func (w *Watcher) RunInBackground()
RunInBackground starts the Watcher in a new thread
Click to show internal directories.
Click to hide internal directories.