IsWatching returns true if the loader is currently watching for configuration changes
()
| 240 | |
| 241 | // IsWatching returns true if the loader is currently watching for configuration changes |
| 242 | func (l *Loader[T]) IsWatching() bool { |
| 243 | l.mutex.RLock() |
| 244 | defer l.mutex.RUnlock() |
| 245 | if l.watcherName == "" { |
| 246 | return false |
| 247 | } |
| 248 | adapter := l.config.GetAdapter() |
| 249 | if watcherAdapter, ok := adapter.(WatcherAdapter); ok { |
| 250 | return watcherAdapter.IsWatching(l.watcherName) |
| 251 | } |
| 252 | return false |
| 253 | } |
nothing calls this directly
no test coverage detected