etcd naming and discovery

This commit is contained in:
skiffer-git
2024-05-11 09:25:08 +08:00
parent eef480efb1
commit 21eb693629
2 changed files with 2 additions and 4 deletions
@@ -32,11 +32,9 @@ const (
)
// NewDiscoveryRegister creates a new service discovery and registry client based on the provided environment type.
func NewDiscoveryRegister(zookeeperConfig *config.ZooKeeper, share *config.Share) (discovery.SvcDiscoveryRegistry1, error) {
return getcd.NewSvcDiscoveryRegistry("openim", []string{"http://localhost:2379"})
func NewDiscoveryRegister(zookeeperConfig *config.ZooKeeper, share *config.Share) (discovery.SvcDiscoveryRegistry, error) {
switch share.Env {
case zookeeperConst:
return zookeeper.NewZkClient(
zookeeperConfig.Address,
zookeeperConfig.Schema,