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 }
func setClusterID(client discovery.Client) error { return client.Set(clusterIDKey, uuid.NewWithoutDashes(), 0) }