1package muduo;
2option java_package = "muduo.rpc.proto";
3option java_outer_classname = "RpcProto";
4
5enum MessageType
6{
7  REQUEST = 1;
8  RESPONSE = 2;
9  ERROR = 3;
10}
11
12enum ErrorCode
13{
14  WRONG_PROTO = 1;
15  NO_SERVICE = 2;
16  NO_METHOD = 3;
17  INVALID_REQUEST = 4;
18  INVALID_RESPONSE = 5;
19}
20
21message RpcMessage
22{
23  required MessageType type = 1;
24  required fixed64 id = 2;
25
26  optional string service = 3;
27  optional string method = 4;
28  optional bytes request = 5;
29
30  optional bytes response = 6;
31
32  optional ErrorCode error = 7;
33}
34