Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/zkname #1263

Merged
merged 1 commit into from
Jun 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions registry/zookeeper/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ import (
"github.com/apache/dubbo-go/remoting/zookeeper"
)

const (
// RegistryZkClient zk client name
RegistryZkClient = "zk registry"
)

func init() {
extension.SetRegistry("zookeeper", newZkRegistry)
}
Expand Down Expand Up @@ -74,7 +69,7 @@ func newZkRegistry(url *common.URL) (registry.Registry, error) {
}
r.InitBaseRegistry(url, r)

err = zookeeper.ValidateZookeeperClient(r, RegistryZkClient)
err = zookeeper.ValidateZookeeperClient(r, url.Location)
if err != nil {
return nil, err
}
Expand Down
7 changes: 1 addition & 6 deletions registry/zookeeper/service_discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ import (
"github.com/apache/dubbo-go/remoting/zookeeper/curator_discovery"
)

const (
// RegistryZkClient zk client name
ServiceDiscoveryZkClient = "zk service discovery"
)

var (
// 16 would be enough. We won't use concurrentMap because in most cases, there are not race condition
instanceMap = make(map[string]registry.ServiceDiscovery, 16)
Expand Down Expand Up @@ -108,7 +103,7 @@ func newZookeeperServiceDiscovery(name string) (registry.ServiceDiscovery, error
url: url,
rootPath: rootPath,
}
err := zookeeper.ValidateZookeeperClient(zksd, ServiceDiscoveryZkClient)
err := zookeeper.ValidateZookeeperClient(zksd, url.Location)
if err != nil {
return nil, err
}
Expand Down