优化日志格式

This commit is contained in:
orgin
2022-03-10 17:56:11 +08:00
parent 484e505ea4
commit e71e92ecdc

View File

@@ -13,12 +13,16 @@ import (
)
const maxClusterNode int = 128
type FuncRpcClient func(nodeId int, serviceMethod string, client []*Client) (error, int)
type FuncRpcServer func() *Server
var nilError = reflect.Zero(reflect.TypeOf((*error)(nil)).Elem())
type RpcError string
var NilError RpcError
func (e RpcError) Error() string {
return string(e)
}
@@ -89,11 +93,11 @@ type IRpcHandler interface {
UnmarshalInParam(rpcProcessor IRpcProcessor, serviceMethod string, rawRpcMethodId uint32, inParam []byte) (interface{}, error)
}
func reqHandlerNull(Returns interface{}, Err RpcError) {
}
var requestHandlerNull reflect.Value
func init() {
requestHandlerNull = reflect.ValueOf(reqHandlerNull)
}
@@ -227,8 +231,6 @@ func (handler *RpcHandler) HandlerRpcRequest(request *RpcRequest) {
}
}()
//如果是原始RPC请求
rawRpcId := request.RpcRequestData.GetRpcMethodId()
if rawRpcId > 0 {