diff --git a/config/discovery.yml b/config/discovery.yml index 3d96ff9b6..6e0922ede 100644 --- a/config/discovery.yml +++ b/config/discovery.yml @@ -1,13 +1,16 @@ + enable: "etcd" etcd: - rootDirectory: openim - address: [ localhost:12379 ] + schema: openim + address: [ http://localhost:2379 ] username: '' password: '' + zookeeper: schema: openim address: [ localhost:12181 ] username: '' password: '' + diff --git a/pkg/common/discoveryregister/discoveryregister.go b/pkg/common/discoveryregister/discoveryregister.go index c2deb6cf2..dbf16eda0 100644 --- a/pkg/common/discoveryregister/discoveryregister.go +++ b/pkg/common/discoveryregister/discoveryregister.go @@ -46,7 +46,7 @@ func NewDiscoveryRegister(zookeeperConfig *config.ZooKeeper, share *config.Share case kubenetesConst: return kubernetes.NewK8sDiscoveryRegister(share.RpcRegisterName.MessageGateway) case etcdConst: - return getcd.NewSvcDiscoveryRegistry("etcd", []string{"http://localhost:2379"}) + return getcd.NewSvcDiscoveryRegistry("etcd", []string{"localhost:2379"}) case directConst: //return direct.NewConnDirect(config) default: