This commit is contained in:
skiffer-git 2024-05-11 12:03:29 +08:00
parent 1b8d9a4aba
commit 2f572cbc81
2 changed files with 17 additions and 1 deletions

16
config/discovery.yml Normal file
View File

@ -0,0 +1,16 @@
enable: "etcd"
etcd:
schema: openim
address: [ http://localhost:2379 ]
username: ''
password: ''
zookeeper:
schema: openim
address: [ localhost:12181 ]
username: ''
password: ''

View File

@ -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: