go_dreamfactory/pb/proto/comm.proto
2022-06-16 14:53:28 +08:00

67 lines
1.6 KiB
Protocol Buffer

syntax = "proto3";
option go_package = ".;pb";
import "errorcode.proto";
import "google/protobuf/any.proto";
//用户消息流结构
message UserMessage {
string MainType =1; //用户消息处理 模块名 例如:user 对应项目中 user的模块
string SubType = 2; //用户消息处理函数名 例如:login 对应项目中 user的模块中 api_login 的处理函数
google.protobuf.Any data = 3;
}
//代理用户转发消息结构
message AgentMessage {
string Ip = 1;
string UserSessionId = 2;
string UserId = 3;
string GatewayServiceId = 4;
string Method = 5;
google.protobuf.Any Message = 6;
}
//RPC 服务固定回复结构
message RPCMessageReply {
ErrorCode Code = 1;
string Message = 2;
string Data = 3;
}
//用户代理绑定Uid请求
message AgentBuildReq {
string UserSessionId = 1;
string UserId = 2;
string WorkerId = 3;
}
//用户代理解绑请求
message AgentUnBuildReq {
string UserSessionId = 1;
}
//向用户代理发送消息请求
message AgentSendMessageReq {
string UserSessionId = 1;
string MainType = 2;
string SubType = 3;
google.protobuf.Any Data = 4;
}
//发送批量消息
message BatchMessageReq {
repeated string UserSessionIds = 1;
string MainType = 2;
string SubType = 3;
google.protobuf.Any Data = 4;
}
//发送广播消息
message BroadCastMessageReq {
string MainType = 1; //服务名
string SubType = 2;
google.protobuf.Any Data = 3;
}
//关闭用户代理
message AgentCloseeReq {
string UserSessionId = 1;
}