WithWatcher is an option for *KoanfAdapter that adds a config watcher. The watcher should notify the configurations whenever a reload event is triggered.
(watcher contract.ConfigWatcher)
| 45 | // WithWatcher is an option for *KoanfAdapter that adds a config watcher. The watcher should notify the configurations |
| 46 | // whenever a reload event is triggered. |
| 47 | func WithWatcher(watcher contract.ConfigWatcher) Option { |
| 48 | return func(option *KoanfAdapter) { |
| 49 | option.watcher = watcher |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | // WithDelimiter changes the default delimiter of Koanf. See Koanf's doc to learn more about delimiters. |
| 54 | func WithDelimiter(delimiter string) Option { |
no outgoing calls