Files
origin/rpc/processor.go
2020-10-27 17:00:15 +08:00

17 lines
585 B
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package rpc
type IRpcProcessor interface {
Marshal(v interface{}) ([]byte, error) //b表示自定义缓冲区可以填nil由系统自动分配
Unmarshal(data []byte, v interface{}) error
MakeRpcRequest(seq uint64,serviceMethod string,noReply bool,inParam []byte,additionParam interface{}) IRpcRequestData
MakeRpcResponse(seq uint64,err *RpcError,reply []byte) IRpcResponseData
ReleaseRpcRequest(rpcRequestData IRpcRequestData)
ReleaseRpcRespose(rpcRequestData IRpcResponseData)
IsParse(param interface{}) bool //是否可解析
GetProcessorType() RpcProcessorType
}