// GetRedisHost get redis host from etcd func GetRedisHost(host chan string) { redisHost, err := config.EtcdRawGetValue(redisHostKey) if err != nil { panic(err) } host <- redisHost }
// 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 }