redis rpc服务, 提供redis操作方法
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.

23 lines
452 B

  1. syntax = "proto3";
  2. package redisrpc;
  3. // 使用key查询
  4. message GetKey {
  5. string key = 1;
  6. }
  7. // 使用hash key查询
  8. message GetHashKey {
  9. string key = 1;
  10. string field = 2;
  11. }
  12. // 使用key查询响应结构
  13. message GetResponse {
  14. string string = 1;
  15. }
  16. // rpc方法
  17. service RedisService {
  18. rpc getByKey (GetKey) returns (GetResponse); // 使用key查询
  19. rpc getByHashKey (GetHashKey) returns (GetResponse); // 使用hash key查询
  20. }