Пример #1
0
// GetRedisHost get redis host from etcd
func GetRedisHost(host chan string) {
	redisHost, err := config.EtcdRawGetValue(redisHostKey)
	if err != nil {
		panic(err)
	}

	host <- redisHost
}
Пример #2
0
// GetMongodbCluster retrieve mongodb cluster node from etcd
func GetMongodbCluster(host chan string) {
	fmt.Println("getting mongodb credentials...")
	mongodbCluster, err := config.EtcdRawGetValue(mongodbClusterKey)
	if err != nil {
		panic(err)
	}

	host <- mongodbCluster
}