"log"
"net"
"net/http"
- "os"
"strings"
"time"
)
}
}
-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"`
}
if err != nil {
if err := this.Arvados.List("keep_disks", nil, &m); err != nil {
- return err
+ return nil, err
}
}
this.SetServiceRoots(service_roots)
- return nil
+ return service_roots, nil
}
type uploadStatus struct {