X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/a32c4f9997a0c8941b62668c5e59941985359c05..57b96147e575d7630ddf81cbb2c554d3adc9c7e2:/sdk/go/keepclient/support.go diff --git a/sdk/go/keepclient/support.go b/sdk/go/keepclient/support.go index c24849e687..940a110081 100644 --- a/sdk/go/keepclient/support.go +++ b/sdk/go/keepclient/support.go @@ -11,7 +11,6 @@ import ( "log" "net" "net/http" - "os" "strings" "time" ) @@ -77,15 +76,7 @@ func (this *KeepClient) setClientSettingsStore() { } } -func (this *KeepClient) DiscoverKeepServers() error { - if prx := os.Getenv("ARVADOS_KEEP_PROXY"); prx != "" { - sr := map[string]string{"proxy": prx} - this.SetServiceRoots(sr) - this.Using_proxy = true - this.setClientSettingsProxy() - return nil - } - +func (this *KeepClient) DiscoverKeepServers() (map[string]string, error) { type svcList struct { Items []keepDisk `json:"items"` } @@ -95,7 +86,7 @@ func (this *KeepClient) DiscoverKeepServers() error { if err != nil { if err := this.Arvados.List("keep_disks", nil, &m); err != nil { - return err + return nil, err } } @@ -130,7 +121,7 @@ func (this *KeepClient) DiscoverKeepServers() error { this.SetServiceRoots(service_roots) - return nil + return service_roots, nil } type uploadStatus struct {