mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-13 23:24:45 +08:00
升级为protobuf3
This commit is contained in:
@@ -23,17 +23,17 @@ func init(){
|
||||
}
|
||||
|
||||
func (slf *PBRpcRequestData) MakeRequest(seq uint64,serviceMethod string,noReply bool,inParam []byte) *PBRpcRequestData{
|
||||
slf.Seq = proto.Uint64(seq)
|
||||
slf.ServiceMethod = proto.String(serviceMethod)
|
||||
slf.NoReply = proto.Bool(noReply)
|
||||
slf.Seq = seq
|
||||
slf.ServiceMethod = serviceMethod
|
||||
slf.NoReply = noReply
|
||||
slf.InParam = inParam
|
||||
|
||||
return slf
|
||||
}
|
||||
|
||||
func (slf *PBRpcResponseData) MakeRespone(seq uint64,err RpcError,reply []byte) *PBRpcResponseData{
|
||||
slf.Seq = proto.Uint64(seq)
|
||||
slf.Error = proto.String(err.Error())
|
||||
slf.Seq = seq
|
||||
slf.Error = err.Error()
|
||||
slf.Reply = reply
|
||||
|
||||
return slf
|
||||
|
||||
Reference in New Issue
Block a user