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查询
|
|
}
|