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

25 lines
452 B

syntax = "proto3";
package productrpc;
// 使用key查询
message GetRequest {
string dbname = 1;
string id = 2;
}
message GetUuidRequest {
string dbname = 1;
string uuid = 2;
}
// 使用key查询响应结构
message GetResponse {
bytes value = 1;
}
// rpc方法
service ProductService {
rpc Get (GetRequest) returns (GetResponse); // 使用id查询
rpc GetByUuid (GetUuidRequest) returns (GetResponse); // 使用uuid查询
}