[ARVADOS] updated: 2ddfe9df5ddeb99bb3856ce166108f5a28f2d360

Git user git at public.curoverse.com
Mon Jul 25 15:54:45 EDT 2016


Summary of changes:
 sdk/go/arvadosclient/arvadosclient.go | 13 ++++++++-----
 sdk/go/keepclient/discover.go         |  5 ++---
 sdk/go/keepclient/discover_test.go    |  2 +-
 3 files changed, 11 insertions(+), 9 deletions(-)

       via  2ddfe9df5ddeb99bb3856ce166108f5a28f2d360 (commit)
      from  acfc0f5ac83618591adbe0b3bf3e6fed2ed6b03b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 2ddfe9df5ddeb99bb3856ce166108f5a28f2d360
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Jul 25 15:54:41 2016 -0400

    9550: Update comments.

diff --git a/sdk/go/arvadosclient/arvadosclient.go b/sdk/go/arvadosclient/arvadosclient.go
index 2befcd5..57f81c2 100644
--- a/sdk/go/arvadosclient/arvadosclient.go
+++ b/sdk/go/arvadosclient/arvadosclient.go
@@ -86,8 +86,10 @@ type ArvadosClient struct {
 	// the client is outside the cluster.
 	External bool
 
-	// Use provided list of keep services, instead of using the
-	// API to discover available services.
+	// Base URIs of Keep services, e.g., {"https://host1:8443",
+	// "https://host2:8443"}.  If this is nil, Keep clients will
+	// use the arvados.v1.keep_services.accessible API to discover
+	// available services.
 	KeepServiceURIs []string
 
 	// Discovery document
@@ -99,9 +101,10 @@ type ArvadosClient struct {
 	Retries int
 }
 
-// Create a new ArvadosClient, initialized with standard Arvados environment
-// variables ARVADOS_API_HOST, ARVADOS_API_TOKEN, and (optionally)
-// ARVADOS_API_HOST_INSECURE.
+// MakeArvadosClient creates a new ArvadosClient using the standard
+// environment variables ARVADOS_API_HOST, ARVADOS_API_TOKEN,
+// ARVADOS_API_HOST_INSECURE, ARVADOS_EXTERNAL_CLIENT, and
+// ARVADOS_KEEP_SERVICES.
 func MakeArvadosClient() (ac ArvadosClient, err error) {
 	var matchTrue = regexp.MustCompile("^(?i:1|yes|true)$")
 	insecure := matchTrue.MatchString(os.Getenv("ARVADOS_API_HOST_INSECURE"))
diff --git a/sdk/go/keepclient/discover.go b/sdk/go/keepclient/discover.go
index 9cf920c..95a73bb 100644
--- a/sdk/go/keepclient/discover.go
+++ b/sdk/go/keepclient/discover.go
@@ -32,14 +32,13 @@ func (this *KeepClient) DiscoverKeepServers() error {
 		return nil
 	}
 
+	// ArvadosClient did not provide a services list. Ask API
+	// server for a list of accessible services.
 	var list svcList
-
-	// Get keep services from api server
 	err := this.Arvados.Call("GET", "keep_services", "", "accessible", nil, &list)
 	if err != nil {
 		return err
 	}
-
 	return this.loadKeepServers(list)
 }
 
diff --git a/sdk/go/keepclient/discover_test.go b/sdk/go/keepclient/discover_test.go
index ab7b2da..b145ee6 100644
--- a/sdk/go/keepclient/discover_test.go
+++ b/sdk/go/keepclient/discover_test.go
@@ -12,7 +12,7 @@ import (
 	"git.curoverse.com/arvados.git/sdk/go/arvadostest"
 )
 
-func ExampleRefreshServices() {
+func ExampleKeepClient_RefreshServices() {
 	arv, err := arvadosclient.MakeArvadosClient()
 	if err != nil {
 		panic(err)

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list