Example #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
}
Example #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
}