You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2020/05/19 15:03:44 UTC

[GitHub] [dubbo-go] flycash opened a new pull request #522: Nacos MetadataReport implementation

flycash opened a new pull request #522:
URL: https://github.com/apache/dubbo-go/pull/522


   <!--  Thanks for sending a pull request! 
   -->
   
   **What this PR does**:
   
   Implement MetadataReport based on Nacos
   
   Fixes #446 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] fangyincheng commented on a change in pull request #522: Nacos MetadataReport implementation

Posted by GitBox <gi...@apache.org>.
fangyincheng commented on a change in pull request #522:
URL: https://github.com/apache/dubbo-go/pull/522#discussion_r432822034



##########
File path: metadata/report/nacos/report.go
##########
@@ -0,0 +1,198 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package nacos
+
+import (
+	"encoding/json"
+	"net/url"
+)
+
+import (
+	"github.com/nacos-group/nacos-sdk-go/clients/config_client"
+	"github.com/nacos-group/nacos-sdk-go/vo"
+	perrors "github.com/pkg/errors"
+)
+
+import (
+	"github.com/apache/dubbo-go/common"
+	"github.com/apache/dubbo-go/common/extension"
+	"github.com/apache/dubbo-go/common/logger"
+	"github.com/apache/dubbo-go/metadata/identifier"
+	"github.com/apache/dubbo-go/metadata/report"
+	"github.com/apache/dubbo-go/metadata/report/factory"
+	"github.com/apache/dubbo-go/remoting/nacos"
+)
+
+func init() {
+	ftry := &nacosMetadataReportFactory{}
+	extension.SetMetadataReportFactory("nacos", func() factory.MetadataReportFactory {
+		return ftry
+	})

Review comment:
       It is recommended to provide a method named Newxxx?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] codecov-commenter edited a comment on pull request #522: Nacos MetadataReport implementation

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #522:
URL: https://github.com/apache/dubbo-go/pull/522#issuecomment-630889858


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=h1) Report
   > Merging [#522](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=desc) into [feature/dubbo-2.7.5](https://codecov.io/gh/apache/dubbo-go/commit/9578fc0bbc1bbabfa6afc79bad3b5fd89009af3b&el=desc) will **decrease** coverage by `0.05%`.
   > The diff coverage is `71.27%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/522/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=tree)
   
   ```diff
   @@                   Coverage Diff                   @@
   ##           feature/dubbo-2.7.5     #522      +/-   ##
   =======================================================
   - Coverage                66.06%   66.01%   -0.06%     
   =======================================================
     Files                      203      204       +1     
     Lines                    10558    10618      +60     
   =======================================================
   + Hits                      6975     7009      +34     
   - Misses                    2909     2933      +24     
   - Partials                   674      676       +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [metadata/report/nacos/report.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-bWV0YWRhdGEvcmVwb3J0L25hY29zL3JlcG9ydC5nbw==) | `70.96% <70.96%> (ø)` | |
   | [registry/nacos/base\_registry.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-cmVnaXN0cnkvbmFjb3MvYmFzZV9yZWdpc3RyeS5nbw==) | `75.00% <100.00%> (+4.26%)` | :arrow_up: |
   | [metadata/report/delegate/delegate\_report.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-bWV0YWRhdGEvcmVwb3J0L2RlbGVnYXRlL2RlbGVnYXRlX3JlcG9ydC5nbw==) | `30.76% <0.00%> (-10.00%)` | :arrow_down: |
   | [remoting/kubernetes/client.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-cmVtb3Rpbmcva3ViZXJuZXRlcy9jbGllbnQuZ28=) | `59.01% <0.00%> (+0.65%)` | :arrow_up: |
   | [remoting/kubernetes/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-cmVtb3Rpbmcva3ViZXJuZXRlcy9saXN0ZW5lci5nbw==) | `57.00% <0.00%> (+0.93%)` | :arrow_up: |
   | [remoting/kubernetes/watch.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-cmVtb3Rpbmcva3ViZXJuZXRlcy93YXRjaC5nbw==) | `80.18% <0.00%> (+0.94%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=footer). Last update [9578fc0...5f0084a](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] AlexStocks commented on a change in pull request #522: Nacos MetadataReport implementation

Posted by GitBox <gi...@apache.org>.
AlexStocks commented on a change in pull request #522:
URL: https://github.com/apache/dubbo-go/pull/522#discussion_r432918760



##########
File path: metadata/report/nacos/report.go
##########
@@ -0,0 +1,198 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package nacos
+
+import (
+	"encoding/json"
+	"net/url"
+)
+
+import (
+	"github.com/nacos-group/nacos-sdk-go/clients/config_client"
+	"github.com/nacos-group/nacos-sdk-go/vo"
+	perrors "github.com/pkg/errors"
+)
+
+import (
+	"github.com/apache/dubbo-go/common"
+	"github.com/apache/dubbo-go/common/extension"
+	"github.com/apache/dubbo-go/common/logger"
+	"github.com/apache/dubbo-go/metadata/identifier"
+	"github.com/apache/dubbo-go/metadata/report"
+	"github.com/apache/dubbo-go/metadata/report/factory"
+	"github.com/apache/dubbo-go/remoting/nacos"
+)
+
+func init() {
+	ftry := &nacosMetadataReportFactory{}
+	extension.SetMetadataReportFactory("nacos", func() factory.MetadataReportFactory {
+		return ftry
+	})
+}
+
+// nacosMetadataReport is the implementation of MetadataReport based Nacos
+type nacosMetadataReport struct {
+	client config_client.IConfigClient
+}
+
+// StoreProviderMetadata will store the metadata
+func (n *nacosMetadataReport) StoreProviderMetadata(providerIdentifier *identifier.MetadataIdentifier, serviceDefinitions string) error {
+	return n.storeMetadata(vo.ConfigParam{
+		DataId:  providerIdentifier.GetIdentifierKey(),
+		Group:   providerIdentifier.Group,
+		Content: serviceDefinitions,
+	})
+}
+
+// StoreConsumerMetadata will store the metadata

Review comment:
       store what metadata?

##########
File path: remoting/nacos/builder.go
##########
@@ -0,0 +1,95 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package nacos
+
+import (
+	"net"
+	"strconv"
+	"strings"
+	"time"
+)
+
+import (
+	"github.com/nacos-group/nacos-sdk-go/clients"
+	"github.com/nacos-group/nacos-sdk-go/clients/config_client"
+	"github.com/nacos-group/nacos-sdk-go/clients/naming_client"
+	nacosConstant "github.com/nacos-group/nacos-sdk-go/common/constant"
+	perrors "github.com/pkg/errors"
+)
+
+import (
+	"github.com/apache/dubbo-go/common"
+	"github.com/apache/dubbo-go/common/constant"
+)
+
+func NewNacosNamingClient(url *common.URL) (naming_client.INamingClient, error) {
+	nacosConfig, err := getNacosConfig(url)
+	if err != nil {
+		return nil, err
+	}
+	return clients.CreateNamingClient(nacosConfig)
+}
+
+func NewNacosConfigClient(url *common.URL) (config_client.IConfigClient, error) {
+	nacosConfig, err := getNacosConfig(url)
+	if err != nil {
+		return nil, err
+	}
+	return clients.CreateConfigClient(nacosConfig)
+}
+
+// getNacosConfig will return the nacos config
+func getNacosConfig(url *common.URL) (map[string]interface{}, error) {
+	if url == nil {
+		return nil, perrors.New("url is empty!")
+	}
+	if len(url.Location) == 0 {
+		return nil, perrors.New("url.location is empty!")
+	}
+	configMap := make(map[string]interface{}, 2)
+
+	addresses := strings.Split(url.Location, ",")
+	serverConfigs := make([]nacosConstant.ServerConfig, 0, len(addresses))
+	for _, addr := range addresses {
+		ip, portStr, err := net.SplitHostPort(addr)
+		if err != nil {
+			return nil, perrors.WithMessagef(err, "split [%s] ", addr)
+		}
+		port, _ := strconv.Atoi(portStr)

Review comment:
       pls handle the error.

##########
File path: metadata/report/nacos/report.go
##########
@@ -0,0 +1,198 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package nacos
+
+import (
+	"encoding/json"
+	"net/url"
+)
+
+import (
+	"github.com/nacos-group/nacos-sdk-go/clients/config_client"
+	"github.com/nacos-group/nacos-sdk-go/vo"
+	perrors "github.com/pkg/errors"
+)
+
+import (
+	"github.com/apache/dubbo-go/common"
+	"github.com/apache/dubbo-go/common/extension"
+	"github.com/apache/dubbo-go/common/logger"
+	"github.com/apache/dubbo-go/metadata/identifier"
+	"github.com/apache/dubbo-go/metadata/report"
+	"github.com/apache/dubbo-go/metadata/report/factory"
+	"github.com/apache/dubbo-go/remoting/nacos"
+)
+
+func init() {
+	ftry := &nacosMetadataReportFactory{}
+	extension.SetMetadataReportFactory("nacos", func() factory.MetadataReportFactory {
+		return ftry
+	})
+}
+
+// nacosMetadataReport is the implementation of MetadataReport based Nacos
+type nacosMetadataReport struct {
+	client config_client.IConfigClient
+}
+
+// StoreProviderMetadata will store the metadata
+func (n *nacosMetadataReport) StoreProviderMetadata(providerIdentifier *identifier.MetadataIdentifier, serviceDefinitions string) error {
+	return n.storeMetadata(vo.ConfigParam{
+		DataId:  providerIdentifier.GetIdentifierKey(),
+		Group:   providerIdentifier.Group,
+		Content: serviceDefinitions,
+	})
+}
+
+// StoreConsumerMetadata will store the metadata
+func (n *nacosMetadataReport) StoreConsumerMetadata(consumerMetadataIdentifier *identifier.MetadataIdentifier, serviceParameterString string) error {
+	return n.storeMetadata(vo.ConfigParam{
+		DataId:  consumerMetadataIdentifier.GetIdentifierKey(),
+		Group:   consumerMetadataIdentifier.Group,
+		Content: serviceParameterString,
+	})
+}
+
+// SaveServiceMetadata will store the metadata

Review comment:
       the comment follows the func above. pls change it.

##########
File path: remoting/nacos/builder.go
##########
@@ -0,0 +1,95 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package nacos
+
+import (
+	"net"
+	"strconv"
+	"strings"
+	"time"
+)
+
+import (
+	"github.com/nacos-group/nacos-sdk-go/clients"
+	"github.com/nacos-group/nacos-sdk-go/clients/config_client"
+	"github.com/nacos-group/nacos-sdk-go/clients/naming_client"
+	nacosConstant "github.com/nacos-group/nacos-sdk-go/common/constant"
+	perrors "github.com/pkg/errors"
+)
+
+import (
+	"github.com/apache/dubbo-go/common"
+	"github.com/apache/dubbo-go/common/constant"
+)
+
+func NewNacosNamingClient(url *common.URL) (naming_client.INamingClient, error) {
+	nacosConfig, err := getNacosConfig(url)
+	if err != nil {
+		return nil, err
+	}
+	return clients.CreateNamingClient(nacosConfig)
+}
+
+func NewNacosConfigClient(url *common.URL) (config_client.IConfigClient, error) {
+	nacosConfig, err := getNacosConfig(url)
+	if err != nil {
+		return nil, err
+	}
+	return clients.CreateConfigClient(nacosConfig)
+}
+
+// getNacosConfig will return the nacos config
+func getNacosConfig(url *common.URL) (map[string]interface{}, error) {
+	if url == nil {
+		return nil, perrors.New("url is empty!")
+	}
+	if len(url.Location) == 0 {
+		return nil, perrors.New("url.location is empty!")
+	}
+	configMap := make(map[string]interface{}, 2)
+
+	addresses := strings.Split(url.Location, ",")
+	serverConfigs := make([]nacosConstant.ServerConfig, 0, len(addresses))
+	for _, addr := range addresses {
+		ip, portStr, err := net.SplitHostPort(addr)
+		if err != nil {
+			return nil, perrors.WithMessagef(err, "split [%s] ", addr)
+		}
+		port, _ := strconv.Atoi(portStr)
+		serverConfigs = append(serverConfigs, nacosConstant.ServerConfig{
+			IpAddr: ip,
+			Port:   uint64(port),
+		})
+	}
+	configMap["serverConfigs"] = serverConfigs
+
+	var clientConfig nacosConstant.ClientConfig
+	timeout, err := time.ParseDuration(url.GetParam(constant.REGISTRY_TIMEOUT_KEY, constant.DEFAULT_REG_TIMEOUT))
+	if err != nil {
+		return nil, err
+	}
+	clientConfig.TimeoutMs = uint64(timeout.Seconds() * 1000)

Review comment:
       hey, guy, pls init clientConfig in this way as follows,
   
   ```Go
   clientConfig := nacosConstant.ClientConfig {
       TimeoutMs : xxx,
       xxx: xxx,
   }




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] flycash commented on a change in pull request #522: Nacos MetadataReport implementation

Posted by GitBox <gi...@apache.org>.
flycash commented on a change in pull request #522:
URL: https://github.com/apache/dubbo-go/pull/522#discussion_r433599591



##########
File path: metadata/report/nacos/report.go
##########
@@ -0,0 +1,198 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package nacos
+
+import (
+	"encoding/json"
+	"net/url"
+)
+
+import (
+	"github.com/nacos-group/nacos-sdk-go/clients/config_client"
+	"github.com/nacos-group/nacos-sdk-go/vo"
+	perrors "github.com/pkg/errors"
+)
+
+import (
+	"github.com/apache/dubbo-go/common"
+	"github.com/apache/dubbo-go/common/extension"
+	"github.com/apache/dubbo-go/common/logger"
+	"github.com/apache/dubbo-go/metadata/identifier"
+	"github.com/apache/dubbo-go/metadata/report"
+	"github.com/apache/dubbo-go/metadata/report/factory"
+	"github.com/apache/dubbo-go/remoting/nacos"
+)
+
+func init() {
+	ftry := &nacosMetadataReportFactory{}
+	extension.SetMetadataReportFactory("nacos", func() factory.MetadataReportFactory {
+		return ftry
+	})
+}
+
+// nacosMetadataReport is the implementation of MetadataReport based Nacos
+type nacosMetadataReport struct {
+	client config_client.IConfigClient
+}
+
+// StoreProviderMetadata will store the metadata
+func (n *nacosMetadataReport) StoreProviderMetadata(providerIdentifier *identifier.MetadataIdentifier, serviceDefinitions string) error {
+	return n.storeMetadata(vo.ConfigParam{
+		DataId:  providerIdentifier.GetIdentifierKey(),
+		Group:   providerIdentifier.Group,
+		Content: serviceDefinitions,
+	})
+}
+
+// StoreConsumerMetadata will store the metadata

Review comment:
       many metadata, long list……




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] codecov-commenter edited a comment on pull request #522: (WIP)Nacos MetadataReport implementation

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #522:
URL: https://github.com/apache/dubbo-go/pull/522#issuecomment-630889858


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=h1) Report
   > Merging [#522](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=desc) into [feature/dubbo-2.7.5](https://codecov.io/gh/apache/dubbo-go/commit/9578fc0bbc1bbabfa6afc79bad3b5fd89009af3b&el=desc) will **decrease** coverage by `0.05%`.
   > The diff coverage is `71.27%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/522/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=tree)
   
   ```diff
   @@                   Coverage Diff                   @@
   ##           feature/dubbo-2.7.5     #522      +/-   ##
   =======================================================
   - Coverage                66.06%   66.01%   -0.06%     
   =======================================================
     Files                      203      204       +1     
     Lines                    10558    10618      +60     
   =======================================================
   + Hits                      6975     7009      +34     
   - Misses                    2909     2933      +24     
   - Partials                   674      676       +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [metadata/report/nacos/report.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-bWV0YWRhdGEvcmVwb3J0L25hY29zL3JlcG9ydC5nbw==) | `70.96% <70.96%> (ø)` | |
   | [registry/nacos/base\_registry.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-cmVnaXN0cnkvbmFjb3MvYmFzZV9yZWdpc3RyeS5nbw==) | `75.00% <100.00%> (+4.26%)` | :arrow_up: |
   | [metadata/report/delegate/delegate\_report.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-bWV0YWRhdGEvcmVwb3J0L2RlbGVnYXRlL2RlbGVnYXRlX3JlcG9ydC5nbw==) | `30.76% <0.00%> (-10.00%)` | :arrow_down: |
   | [remoting/kubernetes/client.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-cmVtb3Rpbmcva3ViZXJuZXRlcy9jbGllbnQuZ28=) | `59.01% <0.00%> (+0.65%)` | :arrow_up: |
   | [remoting/kubernetes/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-cmVtb3Rpbmcva3ViZXJuZXRlcy9saXN0ZW5lci5nbw==) | `57.00% <0.00%> (+0.93%)` | :arrow_up: |
   | [remoting/kubernetes/watch.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-cmVtb3Rpbmcva3ViZXJuZXRlcy93YXRjaC5nbw==) | `80.18% <0.00%> (+0.94%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=footer). Last update [9578fc0...bdd9b71](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] zouyx commented on a change in pull request #522: Nacos MetadataReport implementation

Posted by GitBox <gi...@apache.org>.
zouyx commented on a change in pull request #522:
URL: https://github.com/apache/dubbo-go/pull/522#discussion_r432567053



##########
File path: registry/nacos/base_registry.go
##########
@@ -18,22 +18,15 @@
 package nacos
 
 import (
-	"net"
-	"strconv"
-	"strings"
-	"time"
+	"github.com/apache/dubbo-go/remoting/nacos"

Review comment:
       Combine with 3rd block? Big old.

##########
File path: metadata/report/nacos/report_test.go
##########
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package nacos
+
+import (
+	"strconv"
+	"testing"
+
+	"github.com/stretchr/testify/assert"
+
+	"github.com/apache/dubbo-go/common"
+	"github.com/apache/dubbo-go/common/constant"
+	"github.com/apache/dubbo-go/common/extension"
+	"github.com/apache/dubbo-go/metadata/identifier"
+	"github.com/apache/dubbo-go/metadata/report"
+)

Review comment:
       Format ? big old.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] AlexStocks commented on a change in pull request #522: Nacos MetadataReport implementation

Posted by GitBox <gi...@apache.org>.
AlexStocks commented on a change in pull request #522:
URL: https://github.com/apache/dubbo-go/pull/522#discussion_r432807385



##########
File path: metadata/report/nacos/report_test.go
##########
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package nacos
+
+import (
+	"strconv"
+	"testing"
+
+	"github.com/stretchr/testify/assert"
+
+	"github.com/apache/dubbo-go/common"
+	"github.com/apache/dubbo-go/common/constant"
+	"github.com/apache/dubbo-go/common/extension"
+	"github.com/apache/dubbo-go/metadata/identifier"
+	"github.com/apache/dubbo-go/metadata/report"
+)

Review comment:
       ^_^




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] codecov-commenter edited a comment on pull request #522: Nacos MetadataReport implementation

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #522:
URL: https://github.com/apache/dubbo-go/pull/522#issuecomment-630889858


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=h1) Report
   > Merging [#522](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=desc) into [feature/dubbo-2.7.5](https://codecov.io/gh/apache/dubbo-go/commit/9578fc0bbc1bbabfa6afc79bad3b5fd89009af3b&el=desc) will **increase** coverage by `0.10%`.
   > The diff coverage is `70.52%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/522/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=tree)
   
   ```diff
   @@                   Coverage Diff                   @@
   ##           feature/dubbo-2.7.5     #522      +/-   ##
   =======================================================
   + Coverage                66.06%   66.16%   +0.10%     
   =======================================================
     Files                      203      204       +1     
     Lines                    10558    10610      +52     
   =======================================================
   + Hits                      6975     7020      +45     
   - Misses                    2909     2912       +3     
   - Partials                   674      678       +4     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [metadata/report/nacos/report.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-bWV0YWRhdGEvcmVwb3J0L25hY29zL3JlcG9ydC5nbw==) | `70.21% <70.21%> (ø)` | |
   | [registry/nacos/base\_registry.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-cmVnaXN0cnkvbmFjb3MvYmFzZV9yZWdpc3RyeS5nbw==) | `75.00% <100.00%> (+4.26%)` | :arrow_up: |
   | [remoting/zookeeper/client.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-cmVtb3Rpbmcvem9va2VlcGVyL2NsaWVudC5nbw==) | `67.22% <0.00%> (-1.36%)` | :arrow_down: |
   | [remoting/kubernetes/watch.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-cmVtb3Rpbmcva3ViZXJuZXRlcy93YXRjaC5nbw==) | `78.30% <0.00%> (-0.95%)` | :arrow_down: |
   | [remoting/kubernetes/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-cmVtb3Rpbmcva3ViZXJuZXRlcy9saXN0ZW5lci5nbw==) | `56.07% <0.00%> (ø)` | |
   | [protocol/dubbo/client.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-cHJvdG9jb2wvZHViYm8vY2xpZW50Lmdv) | `69.09% <0.00%> (+1.21%)` | :arrow_up: |
   | [cluster/cluster\_impl/failback\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbGJhY2tfY2x1c3Rlcl9pbnZva2VyLmdv) | `80.64% <0.00%> (+2.15%)` | :arrow_up: |
   | [protocol/dubbo/pool.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-cHJvdG9jb2wvZHViYm8vcG9vbC5nbw==) | `81.27% <0.00%> (+4.56%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=footer). Last update [9578fc0...d997d51](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] zouyx commented on a change in pull request #522: Nacos MetadataReport implementation

Posted by GitBox <gi...@apache.org>.
zouyx commented on a change in pull request #522:
URL: https://github.com/apache/dubbo-go/pull/522#discussion_r434696710



##########
File path: metadata/report/nacos/report.go
##########
@@ -0,0 +1,201 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package nacos
+
+import (
+	"encoding/json"
+	"net/url"
+)
+
+import (
+	"github.com/nacos-group/nacos-sdk-go/clients/config_client"
+	"github.com/nacos-group/nacos-sdk-go/vo"
+	perrors "github.com/pkg/errors"
+)
+
+import (
+	"github.com/apache/dubbo-go/common"
+	"github.com/apache/dubbo-go/common/extension"
+	"github.com/apache/dubbo-go/common/logger"
+	"github.com/apache/dubbo-go/metadata/identifier"
+	"github.com/apache/dubbo-go/metadata/report"
+	"github.com/apache/dubbo-go/metadata/report/factory"
+	"github.com/apache/dubbo-go/remoting/nacos"
+)
+
+func init() {
+	ftry := &nacosMetadataReportFactory{}
+	extension.SetMetadataReportFactory("nacos", func() factory.MetadataReportFactory {
+		return ftry
+	})
+}
+
+// nacosMetadataReport is the implementation of MetadataReport based Nacos
+type nacosMetadataReport struct {
+	client config_client.IConfigClient
+}
+
+// StoreProviderMetadata will store the metadata
+// metadata including the basic info of the server, provider info, and other user custom info
+func (n *nacosMetadataReport) StoreProviderMetadata(providerIdentifier *identifier.MetadataIdentifier, serviceDefinitions string) error {
+	return n.storeMetadata(vo.ConfigParam{
+		DataId:  providerIdentifier.GetIdentifierKey(),
+		Group:   providerIdentifier.Group,
+		Content: serviceDefinitions,
+	})
+}
+
+// StoreConsumerMetadata will store the metadata
+// metadata including the basic info of the server, consumer info, and other user custom info
+func (n *nacosMetadataReport) StoreConsumerMetadata(consumerMetadataIdentifier *identifier.MetadataIdentifier, serviceParameterString string) error {
+	return n.storeMetadata(vo.ConfigParam{
+		DataId:  consumerMetadataIdentifier.GetIdentifierKey(),
+		Group:   consumerMetadataIdentifier.Group,
+		Content: serviceParameterString,
+	})
+}
+
+// SaveServiceMetadata will store the metadata
+// metadata including the basic info of the server, service info, and other user custom info
+func (n *nacosMetadataReport) SaveServiceMetadata(metadataIdentifier *identifier.ServiceMetadataIdentifier, url common.URL) error {
+	return n.storeMetadata(vo.ConfigParam{
+		DataId:  metadataIdentifier.GetIdentifierKey(),
+		Group:   metadataIdentifier.Group,
+		Content: url.String(),
+	})
+}
+
+// RemoveServiceMetadata will remove the service metadata
+func (n *nacosMetadataReport) RemoveServiceMetadata(metadataIdentifier *identifier.ServiceMetadataIdentifier) error {
+	return n.deleteMetadata(vo.ConfigParam{
+		DataId: metadataIdentifier.GetIdentifierKey(),
+		Group:  metadataIdentifier.Group,
+	})
+}
+
+// GetExportedURLs will look up the exported urls.
+// if not found, an empty list will be returned.
+func (n *nacosMetadataReport) GetExportedURLs(metadataIdentifier *identifier.ServiceMetadataIdentifier) []string {
+	return n.getConfigAsArray(vo.ConfigParam{
+		DataId: metadataIdentifier.GetIdentifierKey(),
+		Group:  metadataIdentifier.Group,
+	})
+}
+
+// SaveSubscribedData will convert the urlList to json array and then store it
+func (n *nacosMetadataReport) SaveSubscribedData(subscriberMetadataIdentifier *identifier.SubscriberMetadataIdentifier, urlList []common.URL) error {
+	if len(urlList) == 0 {
+		logger.Warnf("The url list is empty")
+		return nil
+	}
+	urlStrList := make([]string, 0, len(urlList))
+
+	for _, e := range urlList {
+		urlStrList = append(urlStrList, e.String())
+	}
+
+	bytes, err := json.Marshal(urlStrList)
+
+	if err != nil {
+		return perrors.WithMessage(err, "Could not convert the array to json")
+	}
+	return n.storeMetadata(vo.ConfigParam{
+		DataId:  subscriberMetadataIdentifier.GetIdentifierKey(),
+		Group:   subscriberMetadataIdentifier.Group,
+		Content: string(bytes),
+	})
+}
+
+// GetSubscribedURLs will lookup the url
+// if not found, an empty list will be returned
+func (n *nacosMetadataReport) GetSubscribedURLs(subscriberMetadataIdentifier *identifier.SubscriberMetadataIdentifier) []string {
+	return n.getConfigAsArray(vo.ConfigParam{
+		DataId: subscriberMetadataIdentifier.GetIdentifierKey(),
+		Group:  subscriberMetadataIdentifier.Group,
+	})
+}
+
+// GetServiceDefinition will lookup the service definition
+func (n *nacosMetadataReport) GetServiceDefinition(metadataIdentifier *identifier.MetadataIdentifier) string {
+	return n.getConfig(vo.ConfigParam{
+		DataId: metadataIdentifier.GetIdentifierKey(),
+		Group:  metadataIdentifier.Group,
+	})
+}
+
+// storeMetadata will publish the metadata to Nacos
+// if failed or error is not nil, error will be returned
+func (n *nacosMetadataReport) storeMetadata(param vo.ConfigParam) error {
+	res, err := n.client.PublishConfig(param)
+	if err != nil {
+		return perrors.WithMessage(err, "Could not publish the metadata")
+	}
+	if !res {
+		return perrors.New("Publish the metadata failed.")
+	}
+	return nil
+}
+
+// deleteMetadata will delete the metadata
+func (n *nacosMetadataReport) deleteMetadata(param vo.ConfigParam) error {
+	res, err := n.client.DeleteConfig(param)
+	if err != nil {
+		return perrors.WithMessage(err, "Could not delete the metadata")
+	}
+	if !res {
+		return perrors.New("Deleting the metadata failed.")
+	}
+	return nil
+}
+
+// getConfigAsArray will read the config and then convert it as an one-element array
+// error or config not found, an empty list will be returned.
+func (n *nacosMetadataReport) getConfigAsArray(param vo.ConfigParam) []string {
+	cfg := n.getConfig(param)
+	res := make([]string, 0, 1)
+	if len(cfg) == 0 {
+		return res
+	}
+	decodeCfg, err := url.QueryUnescape(cfg)
+	if err != nil {
+		logger.Errorf("The config is invalid: %s", cfg)
+	}

Review comment:
       If error is not null .....then not return? Is it right logic?
   
   And this method has not testcase to cover it .




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] flycash commented on a change in pull request #522: Nacos MetadataReport implementation

Posted by GitBox <gi...@apache.org>.
flycash commented on a change in pull request #522:
URL: https://github.com/apache/dubbo-go/pull/522#discussion_r435342749



##########
File path: metadata/report/nacos/report.go
##########
@@ -0,0 +1,198 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package nacos
+
+import (
+	"encoding/json"
+	"net/url"
+)
+
+import (
+	"github.com/nacos-group/nacos-sdk-go/clients/config_client"
+	"github.com/nacos-group/nacos-sdk-go/vo"
+	perrors "github.com/pkg/errors"
+)
+
+import (
+	"github.com/apache/dubbo-go/common"
+	"github.com/apache/dubbo-go/common/extension"
+	"github.com/apache/dubbo-go/common/logger"
+	"github.com/apache/dubbo-go/metadata/identifier"
+	"github.com/apache/dubbo-go/metadata/report"
+	"github.com/apache/dubbo-go/metadata/report/factory"
+	"github.com/apache/dubbo-go/remoting/nacos"
+)
+
+func init() {
+	ftry := &nacosMetadataReportFactory{}
+	extension.SetMetadataReportFactory("nacos", func() factory.MetadataReportFactory {
+		return ftry
+	})

Review comment:
       If we provide NewXXX method, the factory should be singleton and we need factoryInstance + factoryInitOnce, but using closure can simply the codes




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] codecov-commenter edited a comment on pull request #522: (WIP)Nacos MetadataReport implementation

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #522:
URL: https://github.com/apache/dubbo-go/pull/522#issuecomment-630889858


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=h1) Report
   > Merging [#522](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=desc) into [feature/dubbo-2.7.5](https://codecov.io/gh/apache/dubbo-go/commit/9578fc0bbc1bbabfa6afc79bad3b5fd89009af3b&el=desc) will **decrease** coverage by `0.08%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/522/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=tree)
   
   ```diff
   @@                   Coverage Diff                   @@
   ##           feature/dubbo-2.7.5     #522      +/-   ##
   =======================================================
   - Coverage                66.06%   65.97%   -0.09%     
   =======================================================
     Files                      203      203              
     Lines                    10558    10487      -71     
   =======================================================
   - Hits                      6975     6919      -56     
   + Misses                    2909     2898      -11     
   + Partials                   674      670       -4     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [config\_center/nacos/facade.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-Y29uZmlnX2NlbnRlci9uYWNvcy9mYWNhZGUuZ28=) | `37.50% <0.00%> (-25.00%)` | :arrow_down: |
   | [registry/zookeeper/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-cmVnaXN0cnkvem9va2VlcGVyL3JlZ2lzdHJ5Lmdv) | `46.15% <0.00%> (-9.56%)` | :arrow_down: |
   | [registry/zookeeper/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-cmVnaXN0cnkvem9va2VlcGVyL2xpc3RlbmVyLmdv) | `64.17% <0.00%> (-6.71%)` | :arrow_down: |
   | [config\_center/nacos/client.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-Y29uZmlnX2NlbnRlci9uYWNvcy9jbGllbnQuZ28=) | `55.55% <0.00%> (-1.71%)` | :arrow_down: |
   | [remoting/kubernetes/watch.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-cmVtb3Rpbmcva3ViZXJuZXRlcy93YXRjaC5nbw==) | `78.30% <0.00%> (-0.95%)` | :arrow_down: |
   | [registry/protocol/protocol.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-cmVnaXN0cnkvcHJvdG9jb2wvcHJvdG9jb2wuZ28=) | `80.80% <0.00%> (-0.32%)` | :arrow_down: |
   | [remoting/zookeeper/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-cmVtb3Rpbmcvem9va2VlcGVyL2xpc3RlbmVyLmdv) | `51.38% <0.00%> (+0.28%)` | :arrow_up: |
   | [metadata/report/delegate/delegate\_report.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-bWV0YWRhdGEvcmVwb3J0L2RlbGVnYXRlL2RlbGVnYXRlX3JlcG9ydC5nbw==) | `41.08% <0.00%> (+0.31%)` | :arrow_up: |
   | [remoting/kubernetes/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-cmVtb3Rpbmcva3ViZXJuZXRlcy9saXN0ZW5lci5nbw==) | `57.00% <0.00%> (+0.93%)` | :arrow_up: |
   | [protocol/dubbo/client.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-cHJvdG9jb2wvZHViYm8vY2xpZW50Lmdv) | `69.09% <0.00%> (+1.21%)` | :arrow_up: |
   | ... and [5 more](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=footer). Last update [9578fc0...bdd9b71](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] codecov-commenter edited a comment on pull request #522: Nacos MetadataReport implementation

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #522:
URL: https://github.com/apache/dubbo-go/pull/522#issuecomment-630889858


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=h1) Report
   > Merging [#522](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=desc) into [feature/dubbo-2.7.5](https://codecov.io/gh/apache/dubbo-go/commit/9578fc0bbc1bbabfa6afc79bad3b5fd89009af3b&el=desc) will **decrease** coverage by `0.31%`.
   > The diff coverage is `71.27%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/522/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=tree)
   
   ```diff
   @@                   Coverage Diff                   @@
   ##           feature/dubbo-2.7.5     #522      +/-   ##
   =======================================================
   - Coverage                66.06%   65.74%   -0.32%     
   =======================================================
     Files                      203      204       +1     
     Lines                    10558    10618      +60     
   =======================================================
   + Hits                      6975     6981       +6     
   - Misses                    2909     2961      +52     
   - Partials                   674      676       +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [metadata/report/nacos/report.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-bWV0YWRhdGEvcmVwb3J0L25hY29zL3JlcG9ydC5nbw==) | `70.96% <70.96%> (ø)` | |
   | [registry/nacos/base\_registry.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-cmVnaXN0cnkvbmFjb3MvYmFzZV9yZWdpc3RyeS5nbw==) | `75.00% <100.00%> (+4.26%)` | :arrow_up: |
   | [config\_center/nacos/facade.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-Y29uZmlnX2NlbnRlci9uYWNvcy9mYWNhZGUuZ28=) | `37.50% <0.00%> (-25.00%)` | :arrow_down: |
   | [metadata/report/delegate/delegate\_report.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-bWV0YWRhdGEvcmVwb3J0L2RlbGVnYXRlL2RlbGVnYXRlX3JlcG9ydC5nbw==) | `30.76% <0.00%> (-10.00%)` | :arrow_down: |
   | [protocol/dubbo/client.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-cHJvdG9jb2wvZHViYm8vY2xpZW50Lmdv) | `63.03% <0.00%> (-4.85%)` | :arrow_down: |
   | [protocol/dubbo/pool.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-cHJvdG9jb2wvZHViYm8vcG9vbC5nbw==) | `74.88% <0.00%> (-1.83%)` | :arrow_down: |
   | [config\_center/nacos/client.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-Y29uZmlnX2NlbnRlci9uYWNvcy9jbGllbnQuZ28=) | `55.55% <0.00%> (-1.71%)` | :arrow_down: |
   | [protocol/dubbo/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-cHJvdG9jb2wvZHViYm8vbGlzdGVuZXIuZ28=) | `56.45% <0.00%> (-1.08%)` | :arrow_down: |
   | [remoting/kubernetes/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-cmVtb3Rpbmcva3ViZXJuZXRlcy9saXN0ZW5lci5nbw==) | `56.07% <0.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=footer). Last update [9578fc0...5f0084a](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] codecov-commenter edited a comment on pull request #522: Nacos MetadataReport implementation

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #522:
URL: https://github.com/apache/dubbo-go/pull/522#issuecomment-630889858


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=h1) Report
   > Merging [#522](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=desc) into [feature/dubbo-2.7.5](https://codecov.io/gh/apache/dubbo-go/commit/9578fc0bbc1bbabfa6afc79bad3b5fd89009af3b&el=desc) will **decrease** coverage by `0.31%`.
   > The diff coverage is `71.27%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/522/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=tree)
   
   ```diff
   @@                   Coverage Diff                   @@
   ##           feature/dubbo-2.7.5     #522      +/-   ##
   =======================================================
   - Coverage                66.06%   65.74%   -0.32%     
   =======================================================
     Files                      203      204       +1     
     Lines                    10558    10618      +60     
   =======================================================
   + Hits                      6975     6981       +6     
   - Misses                    2909     2961      +52     
   - Partials                   674      676       +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [metadata/report/nacos/report.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-bWV0YWRhdGEvcmVwb3J0L25hY29zL3JlcG9ydC5nbw==) | `70.96% <70.96%> (ø)` | |
   | [registry/nacos/base\_registry.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-cmVnaXN0cnkvbmFjb3MvYmFzZV9yZWdpc3RyeS5nbw==) | `75.00% <100.00%> (+4.26%)` | :arrow_up: |
   | [config\_center/nacos/facade.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-Y29uZmlnX2NlbnRlci9uYWNvcy9mYWNhZGUuZ28=) | `37.50% <0.00%> (-25.00%)` | :arrow_down: |
   | [metadata/report/delegate/delegate\_report.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-bWV0YWRhdGEvcmVwb3J0L2RlbGVnYXRlL2RlbGVnYXRlX3JlcG9ydC5nbw==) | `30.76% <0.00%> (-10.00%)` | :arrow_down: |
   | [protocol/dubbo/client.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-cHJvdG9jb2wvZHViYm8vY2xpZW50Lmdv) | `63.03% <0.00%> (-4.85%)` | :arrow_down: |
   | [protocol/dubbo/pool.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-cHJvdG9jb2wvZHViYm8vcG9vbC5nbw==) | `74.88% <0.00%> (-1.83%)` | :arrow_down: |
   | [config\_center/nacos/client.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-Y29uZmlnX2NlbnRlci9uYWNvcy9jbGllbnQuZ28=) | `55.55% <0.00%> (-1.71%)` | :arrow_down: |
   | [protocol/dubbo/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-cHJvdG9jb2wvZHViYm8vbGlzdGVuZXIuZ28=) | `56.45% <0.00%> (-1.08%)` | :arrow_down: |
   | [remoting/kubernetes/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-cmVtb3Rpbmcva3ViZXJuZXRlcy9saXN0ZW5lci5nbw==) | `56.07% <0.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=footer). Last update [9578fc0...d997d51](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] codecov-commenter commented on pull request #522: (WIP)Nacos MetadataReport implementation

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #522:
URL: https://github.com/apache/dubbo-go/pull/522#issuecomment-630889858


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=h1) Report
   > Merging [#522](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=desc) into [feature/dubbo-2.7.5](https://codecov.io/gh/apache/dubbo-go/commit/c958389e82fd7b3f27b8847b8a60199f74d68da5&el=desc) will **decrease** coverage by `0.68%`.
   > The diff coverage is `43.70%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/522/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=tree)
   
   ```diff
   @@                   Coverage Diff                   @@
   ##           feature/dubbo-2.7.5     #522      +/-   ##
   =======================================================
   - Coverage                66.66%   65.97%   -0.69%     
   =======================================================
     Files                      199      203       +4     
     Lines                    10212    10487     +275     
   =======================================================
   + Hits                      6808     6919     +111     
   - Misses                    2751     2898     +147     
   - Partials                   653      670      +17     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [metadata/identifier/service\_metadata\_identifier.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-bWV0YWRhdGEvaWRlbnRpZmllci9zZXJ2aWNlX21ldGFkYXRhX2lkZW50aWZpZXIuZ28=) | `30.76% <0.00%> (-69.24%)` | :arrow_down: |
   | [...tadata/identifier/subscribe\_metadata\_identifier.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-bWV0YWRhdGEvaWRlbnRpZmllci9zdWJzY3JpYmVfbWV0YWRhdGFfaWRlbnRpZmllci5nbw==) | `100.00% <ø> (ø)` | |
   | [metadata/definition/mock.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-bWV0YWRhdGEvZGVmaW5pdGlvbi9tb2NrLmdv) | `28.57% <28.57%> (ø)` | |
   | [metadata/report/delegate/delegate\_report.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-bWV0YWRhdGEvcmVwb3J0L2RlbGVnYXRlL2RlbGVnYXRlX3JlcG9ydC5nbw==) | `41.08% <41.08%> (ø)` | |
   | [metadata/service/remote/service.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-bWV0YWRhdGEvc2VydmljZS9yZW1vdGUvc2VydmljZS5nbw==) | `43.95% <43.95%> (ø)` | |
   | [metadata/definition/definition.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-bWV0YWRhdGEvZGVmaW5pdGlvbi9kZWZpbml0aW9uLmdv) | `58.97% <62.50%> (ø)` | |
   | [metadata/service/inmemory/service.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-bWV0YWRhdGEvc2VydmljZS9pbm1lbW9yeS9zZXJ2aWNlLmdv) | `87.03% <70.58%> (ø)` | |
   | [metadata/service/exporter/configurable/exporter.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-bWV0YWRhdGEvc2VydmljZS9leHBvcnRlci9jb25maWd1cmFibGUvZXhwb3J0ZXIuZ28=) | `94.59% <100.00%> (ø)` | |
   | [config\_center/nacos/facade.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-Y29uZmlnX2NlbnRlci9uYWNvcy9mYWNhZGUuZ28=) | `37.50% <0.00%> (-25.00%)` | :arrow_down: |
   | [config\_center/nacos/client.go](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree#diff-Y29uZmlnX2NlbnRlci9uYWNvcy9jbGllbnQuZ28=) | `55.55% <0.00%> (-1.71%)` | :arrow_down: |
   | ... and [6 more](https://codecov.io/gh/apache/dubbo-go/pull/522/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=footer). Last update [c958389...df1a43d](https://codecov.io/gh/apache/dubbo-go/pull/522?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] flycash merged pull request #522: Nacos MetadataReport implementation

Posted by GitBox <gi...@apache.org>.
flycash merged pull request #522:
URL: https://github.com/apache/dubbo-go/pull/522


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] AlexStocks commented on a change in pull request #522: Nacos MetadataReport implementation

Posted by GitBox <gi...@apache.org>.
AlexStocks commented on a change in pull request #522:
URL: https://github.com/apache/dubbo-go/pull/522#discussion_r433793258



##########
File path: metadata/report/nacos/report.go
##########
@@ -0,0 +1,198 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package nacos
+
+import (
+	"encoding/json"
+	"net/url"
+)
+
+import (
+	"github.com/nacos-group/nacos-sdk-go/clients/config_client"
+	"github.com/nacos-group/nacos-sdk-go/vo"
+	perrors "github.com/pkg/errors"
+)
+
+import (
+	"github.com/apache/dubbo-go/common"
+	"github.com/apache/dubbo-go/common/extension"
+	"github.com/apache/dubbo-go/common/logger"
+	"github.com/apache/dubbo-go/metadata/identifier"
+	"github.com/apache/dubbo-go/metadata/report"
+	"github.com/apache/dubbo-go/metadata/report/factory"
+	"github.com/apache/dubbo-go/remoting/nacos"
+)
+
+func init() {
+	ftry := &nacosMetadataReportFactory{}
+	extension.SetMetadataReportFactory("nacos", func() factory.MetadataReportFactory {
+		return ftry
+	})
+}
+
+// nacosMetadataReport is the implementation of MetadataReport based Nacos
+type nacosMetadataReport struct {
+	client config_client.IConfigClient
+}
+
+// StoreProviderMetadata will store the metadata
+func (n *nacosMetadataReport) StoreProviderMetadata(providerIdentifier *identifier.MetadataIdentifier, serviceDefinitions string) error {
+	return n.storeMetadata(vo.ConfigParam{
+		DataId:  providerIdentifier.GetIdentifierKey(),
+		Group:   providerIdentifier.Group,
+		Content: serviceDefinitions,
+	})
+}
+
+// StoreConsumerMetadata will store the metadata

Review comment:
       so u should add more words to explain it clearly.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org