File change notifications from the watcher WatcherItemDidChange triggers when the yaml config is updated sends the updated config to the service to reload its state
(filepath string)
| 97 | // WatcherItemDidChange triggers when the yaml config is updated |
| 98 | // sends the updated config to the service to reload its state |
| 99 | func (m *FileManager) WatcherItemDidChange(filepath string) { |
| 100 | config, err := m.GetConfig() |
| 101 | if err != nil { |
| 102 | m.log.Err(err).Msg("Failed to read new config") |
| 103 | return |
| 104 | } |
| 105 | m.log.Info().Msg("Config file has been updated") |
| 106 | m.notifier.ConfigDidUpdate(config) |
| 107 | } |
| 108 | |
| 109 | // WatcherDidError notifies of errors with the file watcher |
| 110 | func (m *FileManager) WatcherDidError(err error) { |
nothing calls this directly
no test coverage detected