+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: Apache-2.0
+
package keepclient
import (
)
// ClearCache clears the Keep service discovery cache.
-func ClearCache() {
+func RefreshServiceDiscovery() {
svcListCacheMtx.Lock()
defer svcListCacheMtx.Unlock()
for _, ent := range svcListCache {
// ClearCacheOnSIGHUP installs a signal handler that calls
// ClearCache when SIGHUP is received.
-func ClearCacheOnSIGHUP() {
+func RefreshServiceDiscoveryOnSIGHUP() {
svcListCacheMtx.Lock()
defer svcListCacheMtx.Unlock()
if svcListCacheSignal != nil {
signal.Notify(svcListCacheSignal, syscall.SIGHUP)
go func() {
for range svcListCacheSignal {
- ClearCache()
+ RefreshServiceDiscovery()
}
}()
}