"syscall"
"time"
- "git.curoverse.com/arvados.git/sdk/go/arvadosclient"
+ "git.arvados.org/arvados.git/sdk/go/arvadosclient"
)
-// ClearCache clears the Keep service discovery cache.
+// RefreshServiceDiscovery clears the Keep service discovery cache.
func RefreshServiceDiscovery() {
var wg sync.WaitGroup
defer wg.Wait()
}
}
-// ClearCacheOnSIGHUP installs a signal handler that calls
-// ClearCache when SIGHUP is received.
+// RefreshServiceDiscoveryOnSIGHUP installs a signal handler that calls
+// RefreshServiceDiscovery when SIGHUP is received.
func RefreshServiceDiscoveryOnSIGHUP() {
svcListCacheMtx.Lock()
defer svcListCacheMtx.Unlock()
return nil
}
+ if kc.Arvados.ApiServer == "" {
+ return fmt.Errorf("Arvados client is not configured (target API host is not set). Maybe env var ARVADOS_API_HOST should be set first?")
+ }
+
svcListCacheMtx.Lock()
cacheEnt, ok := svcListCache[kc.Arvados.ApiServer]
if !ok {