添加rpc返回码
This commit is contained in:
parent
9784689c1e
commit
a0d20b2d90
@ -16,13 +16,14 @@ enum MsgType
|
|||||||
|
|
||||||
message InternalMsg
|
message InternalMsg
|
||||||
{
|
{
|
||||||
string service_name = 1; // 该服务类型下的具体的服务节点名,需要保证该消息是该服务节点发的。否则可能会导致客户端出现路由错误
|
string serviceName = 1; // 该服务类型下的具体的服务节点名,需要保证该消息是该服务节点发的。否则可能会导致客户端出现路由错误
|
||||||
uint32 conn_id = 2; // 刚登陆时没有user_id,只有conn_id
|
uint32 connId = 2; // 刚登陆时没有user_id,只有conn_id
|
||||||
int64 user_id = 3; // 玩家id
|
int64 userId = 3; // 玩家id
|
||||||
int32 msg_id = 4; // 消息id
|
int32 msgId = 4; // 消息id
|
||||||
bytes msg = 5; // 消息
|
bytes msg = 5; // 消息
|
||||||
MsgType type = 6; // 消息类型
|
MsgType type = 6; // 消息类型
|
||||||
string rpc_msg_id = 7; // rpc msg id
|
string rpcMsgId = 7; // rpc消息id
|
||||||
|
int32 rpcCode = 8; // rpc返回码
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -115,13 +115,14 @@ func (MsgType) EnumDescriptor() ([]byte, []int) {
|
|||||||
|
|
||||||
type InternalMsg struct {
|
type InternalMsg struct {
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` // 该服务类型下的具体的服务节点名,需要保证该消息是该服务节点发的。否则可能会导致客户端出现路由错误
|
ServiceName string `protobuf:"bytes,1,opt,name=serviceName,proto3" json:"serviceName,omitempty"` // 该服务类型下的具体的服务节点名,需要保证该消息是该服务节点发的。否则可能会导致客户端出现路由错误
|
||||||
ConnId uint32 `protobuf:"varint,2,opt,name=conn_id,json=connId,proto3" json:"conn_id,omitempty"` // 刚登陆时没有user_id,只有conn_id
|
ConnId uint32 `protobuf:"varint,2,opt,name=connId,proto3" json:"connId,omitempty"` // 刚登陆时没有user_id,只有conn_id
|
||||||
UserId int64 `protobuf:"varint,3,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // 玩家id
|
UserId int64 `protobuf:"varint,3,opt,name=userId,proto3" json:"userId,omitempty"` // 玩家id
|
||||||
MsgId int32 `protobuf:"varint,4,opt,name=msg_id,json=msgId,proto3" json:"msg_id,omitempty"` // 消息id
|
MsgId int32 `protobuf:"varint,4,opt,name=msgId,proto3" json:"msgId,omitempty"` // 消息id
|
||||||
Msg []byte `protobuf:"bytes,5,opt,name=msg,proto3" json:"msg,omitempty"` // 消息
|
Msg []byte `protobuf:"bytes,5,opt,name=msg,proto3" json:"msg,omitempty"` // 消息
|
||||||
Type MsgType `protobuf:"varint,6,opt,name=type,proto3,enum=ipb.MsgType" json:"type,omitempty"` // 消息类型
|
Type MsgType `protobuf:"varint,6,opt,name=type,proto3,enum=ipb.MsgType" json:"type,omitempty"` // 消息类型
|
||||||
RpcMsgId string `protobuf:"bytes,7,opt,name=rpc_msg_id,json=rpcMsgId,proto3" json:"rpc_msg_id,omitempty"` // rpc msg id
|
RpcMsgId string `protobuf:"bytes,7,opt,name=rpcMsgId,proto3" json:"rpcMsgId,omitempty"` // rpc消息id
|
||||||
|
RpcCode int32 `protobuf:"varint,8,opt,name=rpcCode,proto3" json:"rpcCode,omitempty"` // rpc返回码
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
}
|
}
|
||||||
@ -205,20 +206,27 @@ func (x *InternalMsg) GetRpcMsgId() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *InternalMsg) GetRpcCode() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.RpcCode
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
var File_internal_proto protoreflect.FileDescriptor
|
var File_internal_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
const file_internal_proto_rawDesc = "" +
|
const file_internal_proto_rawDesc = "" +
|
||||||
"\n" +
|
"\n" +
|
||||||
"\x0einternal.proto\x12\x03ipb\"\xcb\x01\n" +
|
"\x0einternal.proto\x12\x03ipb\"\xdf\x01\n" +
|
||||||
"\vInternalMsg\x12!\n" +
|
"\vInternalMsg\x12 \n" +
|
||||||
"\fservice_name\x18\x01 \x01(\tR\vserviceName\x12\x17\n" +
|
"\vserviceName\x18\x01 \x01(\tR\vserviceName\x12\x16\n" +
|
||||||
"\aconn_id\x18\x02 \x01(\rR\x06connId\x12\x17\n" +
|
"\x06connId\x18\x02 \x01(\rR\x06connId\x12\x16\n" +
|
||||||
"\auser_id\x18\x03 \x01(\x03R\x06userId\x12\x15\n" +
|
"\x06userId\x18\x03 \x01(\x03R\x06userId\x12\x14\n" +
|
||||||
"\x06msg_id\x18\x04 \x01(\x05R\x05msgId\x12\x10\n" +
|
"\x05msgId\x18\x04 \x01(\x05R\x05msgId\x12\x10\n" +
|
||||||
"\x03msg\x18\x05 \x01(\fR\x03msg\x12 \n" +
|
"\x03msg\x18\x05 \x01(\fR\x03msg\x12 \n" +
|
||||||
"\x04type\x18\x06 \x01(\x0e2\f.ipb.MsgTypeR\x04type\x12\x1c\n" +
|
"\x04type\x18\x06 \x01(\x0e2\f.ipb.MsgTypeR\x04type\x12\x1a\n" +
|
||||||
"\n" +
|
"\brpcMsgId\x18\a \x01(\tR\brpcMsgId\x12\x18\n" +
|
||||||
"rpc_msg_id\x18\a \x01(\tR\brpcMsgId*+\n" +
|
"\arpcCode\x18\b \x01(\x05R\arpcCode*+\n" +
|
||||||
"\x05MsgId\x12\v\n" +
|
"\x05MsgId\x12\v\n" +
|
||||||
"\aUnknown\x10\x00\x12\x15\n" +
|
"\aUnknown\x10\x00\x12\x15\n" +
|
||||||
"\bInternal\x10\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01*$\n" +
|
"\bInternal\x10\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01*$\n" +
|
||||||
|
Loading…
x
Reference in New Issue
Block a user