This is an automated email from the ASF dual-hosted git repository.

littlecui pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-service-center.git


The following commit(s) were added to refs/heads/master by this push:
     new c06202d2 [feat]upgrade kie version (#1315)
c06202d2 is described below

commit c06202d24fe4bc3e11d1a3258da22ca1ae1b1174
Author: little-cui <sure_0...@qq.com>
AuthorDate: Sat Jul 30 16:32:25 2022 +0800

    [feat]upgrade kie version (#1315)
---
 go.mod                                       |  4 ++--
 go.sum                                       |  4 ++++
 syncer/service/replicator/resource/config.go | 21 +--------------------
 3 files changed, 7 insertions(+), 22 deletions(-)

diff --git a/go.mod b/go.mod
index a804b146..e100c100 100644
--- a/go.mod
+++ b/go.mod
@@ -8,8 +8,8 @@ replace (
 
 require (
        github.com/NYTimes/gziphandler v1.1.1
-       github.com/apache/servicecomb-kie v0.2.1-0.20220725091517-2ff76fd2d869
-       github.com/apache/servicecomb-service-center/eventbase 
v0.0.0-20220624011743-417c1e9a3e18
+       github.com/apache/servicecomb-kie v0.2.1-0.20220730063957-66e6f5efd400
+       github.com/apache/servicecomb-service-center/eventbase 
v0.0.0-20220120070230-26997eb876ca
        github.com/beego/beego/v2 v2.0.2
        github.com/cheggaaa/pb v1.0.25
        github.com/deckarep/golang-set v1.8.0
diff --git a/go.sum b/go.sum
index 8ebf3e07..3165904f 100644
--- a/go.sum
+++ b/go.sum
@@ -93,6 +93,10 @@ github.com/alicebob/miniredis v2.5.0+incompatible/go.mod 
h1:8HZjEj4yU0dwhYHky+Dx
 github.com/antihax/optional v1.0.0/go.mod 
h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
 github.com/apache/servicecomb-kie v0.2.1-0.20220725091517-2ff76fd2d869 
h1:P4jg4QemhLxOvaJt8chzCjHipIiSgPy2I8J1xMkSga4=
 github.com/apache/servicecomb-kie v0.2.1-0.20220725091517-2ff76fd2d869/go.mod 
h1:64faZcMJTiTzcIFBO+4/i2TlzfILq1PUoB5DF61J+Bk=
+github.com/apache/servicecomb-kie v0.2.1-0.20220730030322-a03aaf31cbdd 
h1:6azoQKFID9dveUu3He/ntxd2Rgu4Deze2D3bl2GJWSE=
+github.com/apache/servicecomb-kie v0.2.1-0.20220730030322-a03aaf31cbdd/go.mod 
h1:64faZcMJTiTzcIFBO+4/i2TlzfILq1PUoB5DF61J+Bk=
+github.com/apache/servicecomb-kie v0.2.1-0.20220730063957-66e6f5efd400 
h1:zvkDWVT9EIybCbPUHPOplIt9D85v8d9nbGYXrZwHu9c=
+github.com/apache/servicecomb-kie v0.2.1-0.20220730063957-66e6f5efd400/go.mod 
h1:64faZcMJTiTzcIFBO+4/i2TlzfILq1PUoB5DF61J+Bk=
 github.com/apache/thrift v0.0.0-20180125231006-3d556248a8b9 
h1:ymi1nHra1RZXqjg5xvka4YVyK+3uKPk2B9HUlPRIiBc=
 github.com/apache/thrift v0.0.0-20180125231006-3d556248a8b9/go.mod 
h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
 github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod 
h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
diff --git a/syncer/service/replicator/resource/config.go 
b/syncer/service/replicator/resource/config.go
index 1d054188..73c9a2f5 100644
--- a/syncer/service/replicator/resource/config.go
+++ b/syncer/service/replicator/resource/config.go
@@ -21,39 +21,20 @@ import (
        "context"
        "errors"
        "fmt"
-       "path/filepath"
-       "strings"
 
        kiemodel "github.com/apache/servicecomb-kie/pkg/model"
-       kiecfg "github.com/apache/servicecomb-kie/server/config"
        kiedb "github.com/apache/servicecomb-kie/server/datasource"
        "github.com/apache/servicecomb-service-center/pkg/log"
        "github.com/apache/servicecomb-service-center/pkg/util"
        "github.com/apache/servicecomb-service-center/server/config"
-       
"github.com/apache/servicecomb-service-center/server/plugin/security/tlsconf"
        v1sync "github.com/apache/servicecomb-service-center/syncer/api/v1"
-       "github.com/little-cui/etcdadpt"
 )
 
 const Config = "config"
 
 func NewConfig(e *v1sync.Event) Resource {
        kind := config.GetString("registry.kind", "etcd", 
config.WithStandby("registry_plugin"))
-       uri := config.GetString("registry.etcd.cluster.endpoints", 
"http://127.0.0.1:2379";, config.WithStandby("manager_cluster"))
-       isHTTPS := strings.Contains(strings.ToLower(uri), "https://";)
-       tlsOpts := tlsconf.GetOptions()
-       kiecfg.Configurations.DB.Kind = kind
-       err := kiedb.Init(kiecfg.DB{
-               Kind:        kind,
-               URI:         uri,
-               SSLEnabled:  config.GetSSL().SslEnabled && isHTTPS,
-               Timeout:     
config.GetDuration("registry.etcd.request.timeout", 
etcdadpt.DefaultRequestTimeout, 
config.WithStandby("registry_timeout")).String(),
-               RootCA:      filepath.Join(tlsOpts.Dir, "trust.cer"),
-               CertFile:    filepath.Join(tlsOpts.Dir, "server.cer"),
-               KeyFile:     filepath.Join(tlsOpts.Dir, "server_key.pem"),
-               CertPwdFile: filepath.Join(tlsOpts.Dir, "cert_pwd"),
-               VerifyPeer:  tlsOpts.VerifyPeer,
-       })
+       err := kiedb.Init(kind)
        if err != nil {
                log.Fatal(fmt.Sprintf("kie datasource[%s] init failed", kind), 
err)
        }

Reply via email to