商品rpc数据格式及调用方法
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
412 B

  1. syntax = "proto3";
  2. package productrpc;
  3. // 使用key查询
  4. message GetRequest {
  5. string id = 1;
  6. }
  7. message GetUuidRequest {
  8. string uuid = 1;
  9. }
  10. // 使用key查询响应结构
  11. message GetResponse {
  12. bytes value = 1;
  13. }
  14. // rpc方法
  15. service ProductService {
  16. rpc Get (GetRequest) returns (GetResponse); // 使用id查询
  17. rpc GetByUuid (GetUuidRequest) returns (GetResponse); // 使用uuid查询
  18. }