// createRegistry returns an ectd registry
createRegistry returns an ectd registry
// createRegistry returns an ectd registry
func createRegistry(urls string) (*node.EtcdRegistry, error) {
	ectdEndpoints, err := utils.ParseHostPortAddr(urls)
	if err != nil {
		return nil, errors.Trace(err)
	}
	cli, err := etcd.NewClientFromCfg(ectdEndpoints, etcdDialTimeout, etcd.DefaultRootPath, nil)
	if err != nil {
		return nil, errors.Trace(err)
	}
	return node.NewEtcdRegistry(cli, etcdDialTimeout), nil
}
func createRegistry ( urls string ) ( * node . EtcdRegistry , error ) { ectdEndpoints , err := utils . ParseHostPortAddr ( urls ) if err != nil { return nil , errors . Trace ( err ) } cli , err := etcd . NewClientFromCfg ( ectdEndpoints , etcdDialTimeout , etcd . DefaultRootPath , nil ) if err != nil { return nil , errors . Trace ( err ) } return node . NewEtcdRegistry ( cli , etcdDialTimeout ) , nil }
createRegistry returns an ectd registry
createRegistry returns an ectd registry