Esempio n. 1
0
func listPublishedServices(cb config.Backend) ([]*model.ConfigNode, error) {
	nodes, err := cb.GetRecursive("deis/services")
	if err != nil {
		return nil, err
	}

	return nodes, nil
}
Esempio n. 2
0
func republishServices(ttl uint64, nodes []*model.ConfigNode, cb config.Backend) error {
	for _, node := range nodes {
		_, err := cb.SetWithTTL(node.Key, node.Value, ttl)
		if err != nil {
			return err
		}
	}

	return nil
}