X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/a4b55a80251d666ca39d0f8d201c70e493b4c661..78700dbcc4f5d34f0a4cfee5c040e716d684ed62:/sdk/go/keepclient/support.go diff --git a/sdk/go/keepclient/support.go b/sdk/go/keepclient/support.go index e51dcb3c09..e12214450c 100644 --- a/sdk/go/keepclient/support.go +++ b/sdk/go/keepclient/support.go @@ -2,6 +2,7 @@ package keepclient import ( + "crypto/md5" "git.curoverse.com/arvados.git/sdk/go/streamer" "errors" "fmt" @@ -21,6 +22,10 @@ type keepDisk struct { SvcType string `json:"service_type"` } +func Md5String(s string) (string) { + return fmt.Sprintf("%x", md5.Sum([]byte(s))) +} + func (this *KeepClient) DiscoverKeepServers() error { if prx := os.Getenv("ARVADOS_KEEP_PROXY"); prx != "" { sr := map[string]string{"proxy":prx} @@ -70,10 +75,6 @@ func (this *KeepClient) DiscoverKeepServers() error { return nil } -func (this KeepClient) shuffledServiceRoots(hash string) (pseq []string) { - return NewRootSorter(this.ServiceRoots(), hash).GetSortedRoots() -} - type uploadStatus struct { err error url string