pull/2318/head
skiffer-git 6 months ago
parent 22b21f4d2a
commit 78719683ff

@ -28,7 +28,7 @@ const (
zookeeperConst = "zookeeper" zookeeperConst = "zookeeper"
kubenetesConst = "k8s" kubenetesConst = "k8s"
directConst = "direct" directConst = "direct"
etcd = "etcd" etcdConst = "etcd"
) )
// NewDiscoveryRegister creates a new service discovery and registry client based on the provided environment type. // NewDiscoveryRegister creates a new service discovery and registry client based on the provided environment type.
@ -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 etcd: case etcdConst:
return getcd.NewSvcDiscoveryRegistry("openim", []string{"http://localhost:2379"}) return getcd.NewSvcDiscoveryRegistry("openim", []string{"http://localhost:2379"})
case directConst: case directConst:
//return direct.NewConnDirect(config) //return direct.NewConnDirect(config)

Loading…
Cancel
Save