+// ClusterConfig returns the value of the given key in the current cluster's
+// exported config. If key is an empty string, it'll return the entire config.
+func (c *ArvadosClient) ClusterConfig(key string) (config interface{}, err error) {
+ var clusterConfig interface{}
+ err = c.Call("GET", "config", "", "", nil, &clusterConfig)
+ if err != nil {
+ return nil, err
+ }
+ if key == "" {
+ return clusterConfig, nil
+ }
+ configData, ok := clusterConfig.(map[string]interface{})[key]
+ if !ok {
+ return nil, ErrInvalidArgument
+ }
+ return configData, nil
+}
+