You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by li...@apache.org on 2023/11/08 08:40:35 UTC
(dubbo-go) 01/01: Merge branch 'main' into feature-triple
This is an automated email from the ASF dual-hosted git repository.
liujun pushed a commit to branch feature-triple
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git
commit 4e100df7fa23d646f1e446b84b5f16571a22a75d
Merge: 1444a5289 53843b749
Author: chickenlj <ke...@gmail.com>
AuthorDate: Wed Nov 8 16:39:57 2023 +0800
Merge branch 'main' into feature-triple
.github/workflows/github-actions.yml | 10 +-
cluster/cluster/adaptivesvc/cluster_invoker.go | 2 -
cluster/directory/base/directory.go | 14 +--
cluster/directory/directory.go | 6 +-
cluster/directory/static/directory.go | 12 ++-
cluster/router/condition/dynamic_router.go | 3 +-
cluster/router/tag/match.go | 33 +++++--
common/constant/cluster.go | 5 +
common/extension/registry_directory.go | 31 +++++-
common/host_util.go | 26 +++++
common/match.go | 105 +++++++++++++++++++++
common/url.go | 14 ++-
config/instance/metadata_report_test.go | 5 +
config/metric_config.go | 23 ++---
config/metric_config_test.go | 2 -
config/router_config.go | 6 +-
config_center/configurator/override.go | 89 ++++++++++-------
config_center/mock_dynamic_config.go | 7 +-
config_center/parser/configuration_parser.go | 35 +++++++
go.mod | 1 +
go.sum | 3 +-
imports/imports.go | 1 +
integrate_test.sh | 21 ++---
metadata/mapping/metadata/service_name_mapping.go | 12 +--
metadata/report/delegate/delegate_report.go | 6 ++
metadata/report/etcd/report.go | 5 +
metadata/report/nacos/report.go | 62 ++++++++++--
metadata/report/report.go | 2 +
metadata/report/zookeeper/listener.go | 100 ++++++++++++++++++++
metadata/report/zookeeper/report.go | 58 +++++++++++-
.../local/metadata_service_proxy_factory.go | 2 +-
metadata/service/local/service_proxy.go | 6 +-
metadata/service/local_service.go | 2 +-
metadata/service/remote/service_test.go | 5 +
protocol/jsonrpc/server.go | 4 +-
registry/base_configuration_listener.go | 4 +-
registry/base_registry.go | 28 +-----
registry/directory/directory.go | 103 ++++++++++++++++++--
registry/nacos/service_discovery_test.go | 2 +-
registry/protocol/protocol.go | 16 +---
registry/protocol/protocol_test.go | 2 +
.../servicediscovery/service_discovery_registry.go | 56 ++++-------
.../service_instances_changed_listener_impl.go | 42 +++++++--
.../service_mapping_change_listener_impl.go | 10 ++
registry/zookeeper/listener.go | 2 +-
registry/zookeeper/registry.go | 22 ++---
remoting/nacos/builder.go | 2 +-
remoting/zookeeper/listener.go | 30 ++++--
48 files changed, 793 insertions(+), 244 deletions(-)
diff --cc common/url.go
index cd551c2f9,a07f87c3b..7ec0a108d
--- a/common/url.go
+++ b/common/url.go
@@@ -114,10 -114,20 +114,22 @@@ type URL struct
Username string
Password string
Methods []string
+ // Attributes should not be transported
+ Attributes map[string]interface{} `hessian:"-"`
// special for registry
- SubURL *URL
+ SubURL *URL
+ attributes sync.Map
+ }
+
+ func (c *URL) AddAttribute(key string, value interface{}) {
+ if value != nil {
+ c.attributes.Store(key, value)
+ }
+ }
+
+ func (c *URL) GetAttribute(key string) interface{} {
+ v, _ := c.attributes.Load(key)
+ return v
}
// JavaClassName POJO for URL
diff --cc imports/imports.go
index 54c6ca565,63f5541b1..48c58cb2d
--- a/imports/imports.go
+++ b/imports/imports.go
@@@ -75,9 -76,8 +75,10 @@@ import
_ "dubbo.apache.org/dubbo-go/v3/protocol/grpc"
_ "dubbo.apache.org/dubbo-go/v3/protocol/jsonrpc"
_ "dubbo.apache.org/dubbo-go/v3/protocol/rest"
+ _ "dubbo.apache.org/dubbo-go/v3/protocol/triple"
+ _ "dubbo.apache.org/dubbo-go/v3/protocol/triple/health"
_ "dubbo.apache.org/dubbo-go/v3/proxy/proxy_factory"
+ _ "dubbo.apache.org/dubbo-go/v3/registry/directory"
_ "dubbo.apache.org/dubbo-go/v3/registry/etcdv3"
_ "dubbo.apache.org/dubbo-go/v3/registry/nacos"
_ "dubbo.apache.org/dubbo-go/v3/registry/polaris"
diff --cc registry/protocol/protocol.go
index bc5a23905,eeb287048..bba36151f
--- a/registry/protocol/protocol.go
+++ b/registry/protocol/protocol.go
@@@ -39,9 -39,9 +39,8 @@@ import
"dubbo.apache.org/dubbo-go/v3/config_center"
_ "dubbo.apache.org/dubbo-go/v3/config_center/configurator"
"dubbo.apache.org/dubbo-go/v3/protocol"
- "dubbo.apache.org/dubbo-go/v3/protocol/dubbo3/health"
"dubbo.apache.org/dubbo-go/v3/protocol/protocolwrapper"
"dubbo.apache.org/dubbo-go/v3/registry"
- "dubbo.apache.org/dubbo-go/v3/registry/directory"
"dubbo.apache.org/dubbo-go/v3/remoting"
)