diff options
Diffstat (limited to 'conf')
-rw-r--r-- | conf/storewatcher.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/conf/storewatcher.go b/conf/storewatcher.go index 7a5ab387..ffd20ee0 100644 --- a/conf/storewatcher.go +++ b/conf/storewatcher.go @@ -5,20 +5,20 @@ package conf -type storeCallback struct { +type StoreCallback struct { cb func() } -var storeCallbacks = make(map[*storeCallback]bool) +var storeCallbacks = make(map[*StoreCallback]bool) -func RegisterStoreChangeCallback(cb func()) *storeCallback { +func RegisterStoreChangeCallback(cb func()) *StoreCallback { startWatchingConfigDir() cb() - s := &storeCallback{cb} + s := &StoreCallback{cb} storeCallbacks[s] = true return s } -func UnregisterStoreChangeCallback(cb *storeCallback) { +func (cb *StoreCallback) Unregister() { delete(storeCallbacks, cb) } |