func getClusterID(client discovery.Client) (string, error) { id, err := client.Get(clusterIDKey) if err != nil { return "", err } if id == "" { return "", fmt.Errorf("clusterID not yet set") } return id, nil }