You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by la...@apache.org on 2021/06/11 04:10:42 UTC
[dubbo-go] branch 3.0 updated: Ftr: add triple 'msgpack' codec
support, and user defined serializer support. (#1242)
This is an automated email from the ASF dual-hosted git repository.
laurence pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git
The following commit(s) were added to refs/heads/3.0 by this push:
new 79cbc38 Ftr: add triple 'msgpack' codec support, and user defined serializer support. (#1242)
79cbc38 is described below
commit 79cbc3870ebbba0f6b3038d8a93baa1ce7149afd
Author: Laurence <45...@users.noreply.github.com>
AuthorDate: Fri Jun 11 12:10:32 2021 +0800
Ftr: add triple 'msgpack' codec support, and user defined serializer support. (#1242)
* improve etcd version and change create to put (#1203)
* fix: add msgpack serializer support
* fix: add msgpack serializer support
* fix: change triplr
* fix: add msgpack
* feat: add multicodec
Co-authored-by: randy <zt...@gmail.com>
---
common/constant/serializtion.go | 1 +
go.mod | 2 +-
go.sum | 9 ++++--
protocol/dubbo3/dubbo3_invoker.go | 27 +++---------------
protocol/dubbo3/dubbo3_protocol.go | 52 +++++++++++++++++++++++++++--------
test/integrate/dubbo/go-client/go.sum | 7 +++++
test/integrate/dubbo/go-server/go.sum | 7 +++++
tools/cli/example/server/go.sum | 7 +++++
8 files changed, 74 insertions(+), 38 deletions(-)
diff --git a/common/constant/serializtion.go b/common/constant/serializtion.go
index f27598c..60c51df 100644
--- a/common/constant/serializtion.go
+++ b/common/constant/serializtion.go
@@ -25,4 +25,5 @@ const (
const (
HESSIAN2_SERIALIZATION = "hessian2"
PROTOBUF_SERIALIZATION = "protobuf"
+ MSGPACK_SERIALIZATION = "msgpack"
)
diff --git a/go.mod b/go.mod
index c768225..e246504 100644
--- a/go.mod
+++ b/go.mod
@@ -16,7 +16,7 @@ require (
github.com/docker/go-connections v0.4.0 // indirect
github.com/dubbogo/go-zookeeper v1.0.3
github.com/dubbogo/gost v1.11.9
- github.com/dubbogo/triple v1.0.0
+ github.com/dubbogo/triple v1.0.1-0.20210606070217-0815f3a0a013
github.com/emicklei/go-restful/v3 v3.4.0
github.com/frankban/quicktest v1.4.1 // indirect
github.com/fsnotify/fsnotify v1.4.9
diff --git a/go.sum b/go.sum
index 77d4e95..8e95bfb 100644
--- a/go.sum
+++ b/go.sum
@@ -161,6 +161,7 @@ github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7
github.com/coreos/go-systemd/v22 v22.1.0 h1:kq/SbG2BCKLkDKkjQf5OWwKWUKj1lgs3lFI4PxnR5lg=
github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk=
github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
+github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
@@ -200,8 +201,8 @@ github.com/dubbogo/gost v1.11.9/go.mod h1:HWgGZZQcNhkFpWEc9As671pXAsfoXH7Eyy2MYz
github.com/dubbogo/jsonparser v1.0.1/go.mod h1:tYAtpctvSP/tWw4MeelsowSPgXQRVHHWbqL6ynps8jU=
github.com/dubbogo/net v0.0.2-0.20210326124702-e6a866993192 h1:CBEicrrVwR6u8ty+kL68ItxXVk1jaVYThrsx5ARhxUc=
github.com/dubbogo/net v0.0.2-0.20210326124702-e6a866993192/go.mod h1:B6/ka3g8VzcyrmdCH4VkHP1K0aHeI37FmclS+TCwIBU=
-github.com/dubbogo/triple v1.0.0 h1:mbFU078PmyjO8OywtrNsTZW0RSYIImVGyXE4wLO3Vm0=
-github.com/dubbogo/triple v1.0.0/go.mod h1:duJFWIYOE+Ajxxvk+AOBpEBePFNnviJ52fveZ3vYA04=
+github.com/dubbogo/triple v1.0.1-0.20210606070217-0815f3a0a013 h1:0AfyedfDk8rQpilySkJOv+OsgJuoqbOCjqQLgV8vX9U=
+github.com/dubbogo/triple v1.0.1-0.20210606070217-0815f3a0a013/go.mod h1:4b2yRUdaE6oRl9c+0SDm1mQ6rU9j21uVz8O85KEBsdo=
github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
@@ -832,7 +833,11 @@ github.com/toolkits/concurrent v0.0.0-20150624120057-a4371d70e3e3/go.mod h1:QDlp
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926 h1:G3dpKMzFDjgEh2q1Z7zUUtKa8ViPtH+ocF0bE0g00O8=
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=
+github.com/ugorji/go v1.2.6 h1:tGiWC9HENWE2tqYycIqFTNorMmFRVhNwCpDOpWqnk8E=
+github.com/ugorji/go v1.2.6/go.mod h1:anCg0y61KIhDlPZmnH+so+RQbysYVyDko0IMgJv0Nn0=
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
+github.com/ugorji/go/codec v1.2.6 h1:7kbGefxLoDBuYXOms4yD7223OpNMMPNPZxXk5TvFcyQ=
+github.com/ugorji/go/codec v1.2.6/go.mod h1:V6TCNZ4PHqoHGFZuSG1W8nrCzzdgA2DozYxWFFpvxTw=
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
github.com/vmware/govmomi v0.18.0 h1:f7QxSmP7meCtoAmiKZogvVbLInT+CZx6Px6K5rYsJZo=
diff --git a/protocol/dubbo3/dubbo3_invoker.go b/protocol/dubbo3/dubbo3_invoker.go
index b0eaad0..5c152c7 100644
--- a/protocol/dubbo3/dubbo3_invoker.go
+++ b/protocol/dubbo3/dubbo3_invoker.go
@@ -19,7 +19,6 @@ package dubbo3
import (
"context"
- "fmt"
"reflect"
"strconv"
"strings"
@@ -28,7 +27,6 @@ import (
)
import (
- hessian2 "github.com/apache/dubbo-go-hessian2"
tripleConstant "github.com/dubbogo/triple/pkg/common/constant"
triConfig "github.com/dubbogo/triple/pkg/config"
"github.com/dubbogo/triple/pkg/triple"
@@ -67,21 +65,12 @@ func NewDubboInvoker(url *common.URL) (*DubboInvoker, error) {
key := url.GetParam(constant.BEAN_NAME_KEY, "")
consumerService := config.GetConsumerService(key)
- var triSerializationType tripleConstant.TripleSerializerName
dubboSerializaerType := url.GetParam(constant.SERIALIZATION_KEY, constant.PROTOBUF_SERIALIZATION)
- switch dubboSerializaerType {
- case constant.PROTOBUF_SERIALIZATION:
- triSerializationType = tripleConstant.PBSerializerName
- case constant.HESSIAN2_SERIALIZATION:
- triSerializationType = tripleConstant.TripleHessianWrapperSerializerName
- default:
- panic(fmt.Sprintf("unsupport serialization = %s", dubboSerializaerType))
-
- }
+ triCodecType := tripleConstant.CodecType(dubboSerializaerType)
// new triple client
triOption := triConfig.NewTripleOption(
triConfig.WithClientTimeout(uint32(requestTimeout.Seconds())),
- triConfig.WithSerializerType(triSerializationType),
+ triConfig.WithCodecType(triCodecType),
triConfig.WithLocation(url.Location),
triConfig.WithHeaderAppVersion(url.GetParam(constant.APP_VERSION_KEY, "")),
triConfig.WithHeaderGroup(url.GetParam(constant.GROUP_KEY, "")),
@@ -156,16 +145,8 @@ func (di *DubboInvoker) Invoke(ctx context.Context, invocation protocol.Invocati
methodName := invocation.MethodName()
- res := di.client.Invoke(methodName, in)
-
- result.Rest = res[0]
- // check err
- if res[1].IsValid() && res[1].Interface() != nil {
- result.Err = res[1].Interface().(error)
- } else {
- _ = hessian2.ReflectResponse(res[0], invocation.Reply())
- }
-
+ result.Err = di.client.Invoke(methodName, in, invocation.Reply())
+ result.Rest = invocation.Reply()
return &result
}
diff --git a/protocol/dubbo3/dubbo3_protocol.go b/protocol/dubbo3/dubbo3_protocol.go
index d8c82fe..25ca875 100644
--- a/protocol/dubbo3/dubbo3_protocol.go
+++ b/protocol/dubbo3/dubbo3_protocol.go
@@ -81,9 +81,9 @@ func (dp *DubboProtocol) Export(invoker protocol.Invoker) protocol.Exporter {
service = config.GetProviderService(key)
serializationType := url.GetParam(constant.SERIALIZATION_KEY, constant.PROTOBUF_SERIALIZATION)
- var triSerializationType tripleConstant.TripleSerializerName
- switch serializationType {
- case constant.PROTOBUF_SERIALIZATION:
+ var triSerializationType tripleConstant.CodecType
+
+ if serializationType == constant.PROTOBUF_SERIALIZATION {
m, ok := reflect.TypeOf(service).MethodByName("SetProxyImpl")
if !ok {
panic("method SetProxyImpl is necessary for triple service")
@@ -94,12 +94,26 @@ func (dp *DubboProtocol) Export(invoker protocol.Invoker) protocol.Exporter {
in := []reflect.Value{reflect.ValueOf(service)}
in = append(in, reflect.ValueOf(invoker))
m.Func.Call(in)
- triSerializationType = tripleConstant.PBSerializerName
- case constant.HESSIAN2_SERIALIZATION:
- service = &Dubbo3HessianService{proxyImpl: invoker}
- triSerializationType = tripleConstant.TripleHessianWrapperSerializerName
- default:
- panic(fmt.Sprintf("unsupport serialization = %s", serializationType))
+ triSerializationType = tripleConstant.PBCodecName
+ } else {
+ valueOf := reflect.ValueOf(service)
+ typeOf := valueOf.Type()
+ numField := valueOf.NumMethod()
+ tripleService := &Dubbo3HessianService{proxyImpl: invoker}
+ for i := 0; i < numField; i++ {
+ ft := typeOf.Method(i)
+ if ft.Name == "Reference" {
+ continue
+ }
+ // num out is checked in common/rpc_service.go
+ if ft.Type.NumIn() != 3 {
+ panic(fmt.Sprintf("function %s input params num = %d not supported, which should be 2", ft.Name, ft.Type.NumIn()-1))
+ }
+ typ := ft.Type.In(2)
+ tripleService.setReqParamsInterface(ft.Name, typ)
+ }
+ service = tripleService
+ triSerializationType = tripleConstant.CodecType(serializationType)
}
dp.serviceMap.Store(url.GetParam(constant.INTERFACE_KEY, ""), service)
@@ -151,7 +165,21 @@ type Dubbo3GrpcService interface {
}
type Dubbo3HessianService struct {
- proxyImpl protocol.Invoker
+ proxyImpl protocol.Invoker
+ reqTypeMap sync.Map
+}
+
+func (d *Dubbo3HessianService) setReqParamsInterface(methodName string, typ reflect.Type) {
+ d.reqTypeMap.Store(methodName, typ)
+}
+
+func (d *Dubbo3HessianService) GetReqParamsInteface(methodName string) (interface{}, bool) {
+ val, ok := d.reqTypeMap.Load(methodName)
+ if !ok {
+ return nil, false
+ }
+ typ := val.(reflect.Type)
+ return reflect.New(typ).Interface(), true
}
func (d *Dubbo3HessianService) InvokeWithArgs(ctx context.Context, methodName string, arguments []interface{}) (interface{}, error) {
@@ -160,7 +188,7 @@ func (d *Dubbo3HessianService) InvokeWithArgs(ctx context.Context, methodName st
}
// openServer open a dubbo3 server, if there is already a service using the same protocol, it returns directly.
-func (dp *DubboProtocol) openServer(url *common.URL, tripleSerializationType tripleConstant.TripleSerializerName) {
+func (dp *DubboProtocol) openServer(url *common.URL, tripleCodecType tripleConstant.CodecType) {
_, ok := dp.serverMap[url.Location]
if ok {
return
@@ -178,7 +206,7 @@ func (dp *DubboProtocol) openServer(url *common.URL, tripleSerializationType tri
}
triOption := triConfig.NewTripleOption(
- triConfig.WithSerializerType(tripleSerializationType),
+ triConfig.WithCodecType(tripleCodecType),
triConfig.WithLocation(url.Location),
triConfig.WithLogger(logger.GetLogger()),
)
diff --git a/test/integrate/dubbo/go-client/go.sum b/test/integrate/dubbo/go-client/go.sum
index 0bdb955..8a616f4 100644
--- a/test/integrate/dubbo/go-client/go.sum
+++ b/test/integrate/dubbo/go-client/go.sum
@@ -163,6 +163,9 @@ github.com/dubbogo/gost v1.11.9/go.mod h1:HWgGZZQcNhkFpWEc9As671pXAsfoXH7Eyy2MYz
github.com/dubbogo/jsonparser v1.0.1/go.mod h1:tYAtpctvSP/tWw4MeelsowSPgXQRVHHWbqL6ynps8jU=
github.com/dubbogo/net v0.0.2-0.20210326124702-e6a866993192/go.mod h1:B6/ka3g8VzcyrmdCH4VkHP1K0aHeI37FmclS+TCwIBU=
github.com/dubbogo/triple v1.0.0/go.mod h1:duJFWIYOE+Ajxxvk+AOBpEBePFNnviJ52fveZ3vYA04=
+github.com/dubbogo/triple v1.0.1-0.20210518093320-be4ea8823a15/go.mod h1:3CPN7tvEeN4G4zWP7Zhz1VmfEyRU8UvUTVm0aP9CV1g=
+github.com/dubbogo/triple v1.0.1-0.20210524091548-f33ebded31e9/go.mod h1:4b2yRUdaE6oRl9c+0SDm1mQ6rU9j21uVz8O85KEBsdo=
+github.com/dubbogo/triple v1.0.1-0.20210606070217-0815f3a0a013/go.mod h1:4b2yRUdaE6oRl9c+0SDm1mQ6rU9j21uVz8O85KEBsdo=
github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/dvyukov/go-fuzz v0.0.0-20210429054444-fca39067bc72/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw=
@@ -702,9 +705,13 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1
github.com/toolkits/concurrent v0.0.0-20150624120057-a4371d70e3e3/go.mod h1:QDlpd3qS71vYtakd2hmdpqhJ9nwv6mD6A30bQ1BPBFE=
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=
+github.com/ugorji/go v1.2.6/go.mod h1:anCg0y61KIhDlPZmnH+so+RQbysYVyDko0IMgJv0Nn0=
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
+github.com/ugorji/go/codec v1.2.6/go.mod h1:V6TCNZ4PHqoHGFZuSG1W8nrCzzdgA2DozYxWFFpvxTw=
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
+github.com/vmihailenco/msgpack/v5 v5.3.2/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc=
+github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds=
github.com/vmware/govmomi v0.18.0/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59bHWk6aFU=
github.com/willf/bitset v1.1.10 h1:NotGKqX0KwQ72NUzqrjZq5ipPNDQex9lo3WpaS8L2sc=
github.com/willf/bitset v1.1.10/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4=
diff --git a/test/integrate/dubbo/go-server/go.sum b/test/integrate/dubbo/go-server/go.sum
index 9545a0d..8a1fc09 100644
--- a/test/integrate/dubbo/go-server/go.sum
+++ b/test/integrate/dubbo/go-server/go.sum
@@ -165,6 +165,9 @@ github.com/dubbogo/gost v1.11.9/go.mod h1:HWgGZZQcNhkFpWEc9As671pXAsfoXH7Eyy2MYz
github.com/dubbogo/jsonparser v1.0.1/go.mod h1:tYAtpctvSP/tWw4MeelsowSPgXQRVHHWbqL6ynps8jU=
github.com/dubbogo/net v0.0.2-0.20210326124702-e6a866993192/go.mod h1:B6/ka3g8VzcyrmdCH4VkHP1K0aHeI37FmclS+TCwIBU=
github.com/dubbogo/triple v1.0.0/go.mod h1:duJFWIYOE+Ajxxvk+AOBpEBePFNnviJ52fveZ3vYA04=
+github.com/dubbogo/triple v1.0.1-0.20210518093320-be4ea8823a15/go.mod h1:3CPN7tvEeN4G4zWP7Zhz1VmfEyRU8UvUTVm0aP9CV1g=
+github.com/dubbogo/triple v1.0.1-0.20210524091548-f33ebded31e9/go.mod h1:4b2yRUdaE6oRl9c+0SDm1mQ6rU9j21uVz8O85KEBsdo=
+github.com/dubbogo/triple v1.0.1-0.20210606070217-0815f3a0a013/go.mod h1:4b2yRUdaE6oRl9c+0SDm1mQ6rU9j21uVz8O85KEBsdo=
github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/dvyukov/go-fuzz v0.0.0-20210429054444-fca39067bc72/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw=
@@ -705,9 +708,13 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1
github.com/toolkits/concurrent v0.0.0-20150624120057-a4371d70e3e3/go.mod h1:QDlpd3qS71vYtakd2hmdpqhJ9nwv6mD6A30bQ1BPBFE=
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=
+github.com/ugorji/go v1.2.6/go.mod h1:anCg0y61KIhDlPZmnH+so+RQbysYVyDko0IMgJv0Nn0=
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
+github.com/ugorji/go/codec v1.2.6/go.mod h1:V6TCNZ4PHqoHGFZuSG1W8nrCzzdgA2DozYxWFFpvxTw=
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
+github.com/vmihailenco/msgpack/v5 v5.3.2/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc=
+github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds=
github.com/vmware/govmomi v0.18.0/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59bHWk6aFU=
github.com/willf/bitset v1.1.10 h1:NotGKqX0KwQ72NUzqrjZq5ipPNDQex9lo3WpaS8L2sc=
github.com/willf/bitset v1.1.10/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4=
diff --git a/tools/cli/example/server/go.sum b/tools/cli/example/server/go.sum
index 2be3036..d3719e3 100644
--- a/tools/cli/example/server/go.sum
+++ b/tools/cli/example/server/go.sum
@@ -162,6 +162,9 @@ github.com/dubbogo/gost v1.11.9/go.mod h1:HWgGZZQcNhkFpWEc9As671pXAsfoXH7Eyy2MYz
github.com/dubbogo/jsonparser v1.0.1/go.mod h1:tYAtpctvSP/tWw4MeelsowSPgXQRVHHWbqL6ynps8jU=
github.com/dubbogo/net v0.0.2-0.20210326124702-e6a866993192/go.mod h1:B6/ka3g8VzcyrmdCH4VkHP1K0aHeI37FmclS+TCwIBU=
github.com/dubbogo/triple v1.0.0/go.mod h1:duJFWIYOE+Ajxxvk+AOBpEBePFNnviJ52fveZ3vYA04=
+github.com/dubbogo/triple v1.0.1-0.20210518093320-be4ea8823a15/go.mod h1:3CPN7tvEeN4G4zWP7Zhz1VmfEyRU8UvUTVm0aP9CV1g=
+github.com/dubbogo/triple v1.0.1-0.20210524091548-f33ebded31e9/go.mod h1:4b2yRUdaE6oRl9c+0SDm1mQ6rU9j21uVz8O85KEBsdo=
+github.com/dubbogo/triple v1.0.1-0.20210606070217-0815f3a0a013/go.mod h1:4b2yRUdaE6oRl9c+0SDm1mQ6rU9j21uVz8O85KEBsdo=
github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/dvyukov/go-fuzz v0.0.0-20210429054444-fca39067bc72/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw=
@@ -697,9 +700,13 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1
github.com/toolkits/concurrent v0.0.0-20150624120057-a4371d70e3e3/go.mod h1:QDlpd3qS71vYtakd2hmdpqhJ9nwv6mD6A30bQ1BPBFE=
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=
+github.com/ugorji/go v1.2.6/go.mod h1:anCg0y61KIhDlPZmnH+so+RQbysYVyDko0IMgJv0Nn0=
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
+github.com/ugorji/go/codec v1.2.6/go.mod h1:V6TCNZ4PHqoHGFZuSG1W8nrCzzdgA2DozYxWFFpvxTw=
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
+github.com/vmihailenco/msgpack/v5 v5.3.2/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc=
+github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds=
github.com/vmware/govmomi v0.18.0/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59bHWk6aFU=
github.com/willf/bitset v1.1.10 h1:NotGKqX0KwQ72NUzqrjZq5ipPNDQex9lo3WpaS8L2sc=
github.com/willf/bitset v1.1.10/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4=