Exemple #1
0
func pcPath(pcID fields.ID) (string, error) {
	if pcID == "" {
		return "", util.Errorf("Path requested for empty pod cluster ID")
	}

	return path.Join(podClusterTree, pcID.String()), nil
}
Exemple #2
0
func (s *consulStore) Delete(id fields.ID) error {
	key, err := pcPath(id)
	if err != nil {
		return err
	}

	_, err = s.kv.Delete(key, nil)
	if err != nil {
		return consulutil.NewKVError("delete", key, err)
	}

	return s.applicator.RemoveAllLabels(labels.PC, id.String())
}
Exemple #3
0
func pcSyncLockPath(id fields.ID, syncerType ConcreteSyncerType) string {
	return path.Join(consulutil.LOCK_TREE, podClusterTree, id.String(), syncerType.String())
}