public_pbrpc_meta.proto 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. // Licensed to the Apache Software Foundation (ASF) under one
  2. // or more contributor license agreements. See the NOTICE file
  3. // distributed with this work for additional information
  4. // regarding copyright ownership. The ASF licenses this file
  5. // to you under the Apache License, Version 2.0 (the
  6. // "License"); you may not use this file except in compliance
  7. // with the License. You may obtain a copy of the License at
  8. //
  9. // http://www.apache.org/licenses/LICENSE-2.0
  10. //
  11. // Unless required by applicable law or agreed to in writing,
  12. // software distributed under the License is distributed on an
  13. // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  14. // KIND, either express or implied. See the License for the
  15. // specific language governing permissions and limitations
  16. // under the License.
  17. syntax="proto2";
  18. package brpc.policy;
  19. option java_package = "com.brpc.policy";
  20. option java_outer_classname = "PublicPbrpcProto";
  21. message PublicPbrpcRequest{
  22. optional RequestHead requestHead = 1;
  23. repeated RequestBody requestBody = 2;
  24. }
  25. message RequestHead{
  26. optional string from_host = 1;
  27. optional uint32 content_type = 2;
  28. optional bool connection = 3;
  29. optional string charset = 4;
  30. optional string accept_charset = 5;
  31. optional string create_time = 6;
  32. optional uint64 log_id = 7;
  33. optional uint32 compress_type = 8;
  34. }
  35. message RequestBody{
  36. optional string version = 1;
  37. optional string charset = 2;
  38. required string service = 3;
  39. required uint32 method_id = 4;
  40. required uint64 id = 5;
  41. optional bytes serialized_request = 6;
  42. }
  43. message PublicPbrpcResponse {
  44. optional ResponseHead responseHead = 1;
  45. repeated ResponseBody responseBody = 2;
  46. }
  47. message ResponseHead{
  48. required sint32 code = 1;
  49. optional string text = 2;
  50. optional string from_host = 3;
  51. optional uint32 compress_type = 4;
  52. }
  53. message ResponseBody{
  54. optional bytes serialized_response = 1;
  55. optional string version = 2;
  56. optional int32 error = 3;
  57. required uint64 id = 4;
  58. }