MCPcopy
hub / github.com/gogf/gf / IsWatching

Method IsWatching

os/gcfg/gcfg_loader.go:242–253  ·  view source on GitHub ↗

IsWatching returns true if the loader is currently watching for configuration changes

()

Source from the content-addressed store, hash-verified

240
241// IsWatching returns true if the loader is currently watching for configuration changes
242func (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}

Callers

nothing calls this directly

Calls 4

IsWatchingMethod · 0.65
RLockMethod · 0.45
RUnlockMethod · 0.45
GetAdapterMethod · 0.45

Tested by

no test coverage detected