商品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.

24 lines
452 B

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