projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
12260: Fix remote ping auth. Make server work.
[arvados.git]
/
sdk
/
go
/
arvados
/
config.go
diff --git
a/sdk/go/arvados/config.go
b/sdk/go/arvados/config.go
index 537de2ac178e27320c9c97a380ed75816fcee8e4..d7bae38080f2a983e75f8364bf3b9c1aad8f6ece 100644
(file)
--- a/
sdk/go/arvados/config.go
+++ b/
sdk/go/arvados/config.go
@@
-24,7
+24,9
@@
func GetConfig() (*Config, error) {
// cluster, or the default/only configured cluster if clusterID is "".
func (sc *Config) GetCluster(clusterID string) (*Cluster, error) {
if clusterID == "" {
// cluster, or the default/only configured cluster if clusterID is "".
func (sc *Config) GetCluster(clusterID string) (*Cluster, error) {
if clusterID == "" {
- if len(sc.Clusters) != 1 {
+ if len(sc.Clusters) == 0 {
+ return nil, fmt.Errorf("no clusters configured")
+ } else if len(sc.Clusters) > 1 {
return nil, fmt.Errorf("multiple clusters configured, cannot choose")
} else {
for id, cc := range sc.Clusters {
return nil, fmt.Errorf("multiple clusters configured, cannot choose")
} else {
for id, cc := range sc.Clusters {
@@
-79,9
+81,14
@@
func (cc *Cluster) GetSystemNode(node string) (*SystemNode, error) {
}
type SystemNode struct {
}
type SystemNode struct {
+ Health Health
Keepstore Keepstore
}
Keepstore Keepstore
}
+type Health struct {
+ Listen string
+}
+
type Keepstore struct {
Listen string
}
type Keepstore struct {
Listen string
}