wenxuwan commented on a change in pull request #1479:
URL: https://github.com/apache/dubbo-go/pull/1479#discussion_r713918333



##########
File path: config_center/nacos/client.go
##########
@@ -18,173 +18,63 @@
 package nacos
 
 import (
-       "strconv"
-       "strings"
        "sync"
        "time"
 )
 
 import (
-       "github.com/nacos-group/nacos-sdk-go/clients"
-       "github.com/nacos-group/nacos-sdk-go/clients/config_client"
-       nacosconst "github.com/nacos-group/nacos-sdk-go/common/constant"
+       nacosClient "github.com/dubbogo/gost/database/kv/nacos"
        perrors "github.com/pkg/errors"
 )
 
 import (
-       "github.com/apache/dubbo-go/common"
-       "github.com/apache/dubbo-go/common/constant"
        "github.com/apache/dubbo-go/common/logger"
+       "github.com/apache/dubbo-go/remoting/nacos"
 )
 
-// NacosClient Nacos client
+// NacosClient Nacos configClient
 type NacosClient struct {
-       name       string
-       NacosAddrs []string
-       sync.Mutex // for Client
-       client     *config_client.IConfigClient
-       exit       chan struct{}
-       Timeout    time.Duration
-       once       sync.Once
-       onceClose  func()
+       name         string
+       NacosAddrs   []string
+       sync.Mutex   // for Client
+       configClient *nacosClient.NacosConfigClient
+       exit         chan struct{}
+       Timeout      time.Duration
+       once         sync.Once
+       onceClose    func()
 }
 
 // Client Get Client
-func (n *NacosClient) Client() *config_client.IConfigClient {
-       return n.client
+func (n *NacosClient) Client() *nacosClient.NacosConfigClient {
+       return n.configClient

Review comment:
       Get client should use lock just same with SetClient




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to