mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-26 19:46:57 +08:00
add etcd
This commit is contained in:
parent
1b8d9a4aba
commit
2f572cbc81
16
config/discovery.yml
Normal file
16
config/discovery.yml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
|
||||||
|
enable: "etcd"
|
||||||
|
etcd:
|
||||||
|
schema: openim
|
||||||
|
address: [ http://localhost:2379 ]
|
||||||
|
username: ''
|
||||||
|
password: ''
|
||||||
|
|
||||||
|
|
||||||
|
zookeeper:
|
||||||
|
schema: openim
|
||||||
|
address: [ localhost:12181 ]
|
||||||
|
username: ''
|
||||||
|
password: ''
|
||||||
|
|
||||||
|
|
@ -46,7 +46,7 @@ func NewDiscoveryRegister(zookeeperConfig *config.ZooKeeper, share *config.Share
|
|||||||
case kubenetesConst:
|
case kubenetesConst:
|
||||||
return kubernetes.NewK8sDiscoveryRegister(share.RpcRegisterName.MessageGateway)
|
return kubernetes.NewK8sDiscoveryRegister(share.RpcRegisterName.MessageGateway)
|
||||||
case etcdConst:
|
case etcdConst:
|
||||||
return getcd.NewSvcDiscoveryRegistry("etcd", []string{"http://localhost:2379"})
|
return getcd.NewSvcDiscoveryRegistry("etcd", []string{"localhost:2379"})
|
||||||
case directConst:
|
case directConst:
|
||||||
//return direct.NewConnDirect(config)
|
//return direct.NewConnDirect(config)
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user