X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/7c7dc19ffa0a20fff6d97e51c874bfaca9596b24..c09663a2b1342e755daafcf8e4a4c2b121e4a253:/sdk/go/keepclient/discover.go diff --git a/sdk/go/keepclient/discover.go b/sdk/go/keepclient/discover.go index c5413d4a4b..2140dceabb 100644 --- a/sdk/go/keepclient/discover.go +++ b/sdk/go/keepclient/discover.go @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: Apache-2.0 + package keepclient import ( @@ -15,7 +19,7 @@ import ( ) // ClearCache clears the Keep service discovery cache. -func ClearCache() { +func RefreshServiceDiscovery() { svcListCacheMtx.Lock() defer svcListCacheMtx.Unlock() for _, ent := range svcListCache { @@ -25,7 +29,7 @@ func ClearCache() { // ClearCacheOnSIGHUP installs a signal handler that calls // ClearCache when SIGHUP is received. -func ClearCacheOnSIGHUP() { +func RefreshServiceDiscoveryOnSIGHUP() { svcListCacheMtx.Lock() defer svcListCacheMtx.Unlock() if svcListCacheSignal != nil { @@ -35,7 +39,7 @@ func ClearCacheOnSIGHUP() { signal.Notify(svcListCacheSignal, syscall.SIGHUP) go func() { for range svcListCacheSignal { - ClearCache() + RefreshServiceDiscovery() } }() }