aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/conf
diff options
context:
space:
mode:
Diffstat (limited to 'conf')
-rw-r--r--conf/storewatcher.go10
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)
}