新增对rpc参数数据类型自动识别(同时支持json与protobuf方式序列化与反序列化)

This commit is contained in:
boyce
2020-10-08 14:12:57 +08:00
parent a4d2a0c4ac
commit 6edc5a0762
8 changed files with 102 additions and 37 deletions

View File

@@ -128,6 +128,11 @@ func (slf *PBProcessor) ReleaseRpcRespose(rpcRequestData IRpcResponseData){
rpcPbResponeDataPool.Put(rpcRequestData)
}
func (slf *PBProcessor) IsParse(param interface{}) bool {
_,ok := param.(proto.Message)
return ok
}
func (slf *PBRpcRequestData) IsNoReply() bool{
return slf.GetNoReply()
@@ -147,4 +152,3 @@ func (slf *PBRpcResponseData) GetErr() *RpcError {