lishuo5263 commented on code in PR #35:
URL:
https://github.com/apache/shenyu-client-golang/pull/35#discussion_r946302851
##########
clients/etcd_client/etcd_client.go:
##########
@@ -17,32 +17,172 @@
package etcd_client
+import (
+ "context"
+ "encoding/json"
+ "github.com/apache/shenyu-client-golang/model"
+ "github.com/wonderivan/logger"
+ clientv3 "go.etcd.io/etcd/client/v3"
+ "time"
+)
+
/**
* ShenYuEtcdClient
**/
type ShenYuEtcdClient struct {
Ecp *EtcdClientParam //EtcdClientParam
-
+ EtcdClient *clientv3.Client //EtcdClient
+ GlobalLease clientv3.LeaseID //global lease
}
/**
* ConsulClientParam
**/
type EtcdClientParam struct {
+ EtcdServers []string //the customer etcd server address
+ UserName string //the customer etcd server userName
+ Password string //the customer etcd server pwd
+ TimeOut int64 //the customer etcd server timeout
+ TTL int64 //the customer etcd key rent
+}
+
+func (sec *ShenYuEtcdClient) NewClient(clientParam interface{}) (client
interface{}, createResult bool, err error) {
+ ccp, ok := clientParam.(*EtcdClientParam)
Review Comment:
Use ecp ,not consul ccp.
--
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]