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.

71 lines
1.5 KiB

7 years ago
7 years ago
7 years ago
7 years ago
  1. syntax = "proto3";
  2. package master_pb;
  3. //////////////////////////////////////////////////
  4. service Seaweed {
  5. rpc SendHeartbeat (stream Heartbeat) returns (stream HeartbeatResponse) {
  6. }
  7. rpc KeepConnected (stream ClientListenRequest) returns (stream VolumeLocation) {
  8. }
  9. }
  10. //////////////////////////////////////////////////
  11. message Heartbeat {
  12. string ip = 1;
  13. uint32 port = 2;
  14. string public_url = 3;
  15. uint32 max_volume_count = 4;
  16. uint64 max_file_key = 5;
  17. string data_center = 6;
  18. string rack = 7;
  19. uint32 admin_port = 8;
  20. repeated VolumeInformationMessage volumes = 9;
  21. // delta volume ids
  22. repeated uint32 new_vids = 10;
  23. repeated uint32 deleted_vids = 11;
  24. }
  25. message HeartbeatResponse {
  26. uint64 volumeSizeLimit = 1;
  27. string secretKey = 2;
  28. string leader = 3;
  29. }
  30. message VolumeInformationMessage {
  31. uint32 id = 1;
  32. uint64 size = 2;
  33. string collection = 3;
  34. uint64 file_count = 4;
  35. uint64 delete_count = 5;
  36. uint64 deleted_byte_count = 6;
  37. bool read_only = 7;
  38. uint32 replica_placement = 8;
  39. uint32 version = 9;
  40. uint32 ttl = 10;
  41. }
  42. message Empty {
  43. }
  44. message SuperBlockExtra {
  45. message ErasureCoding {
  46. uint32 data = 1;
  47. uint32 parity = 2;
  48. repeated uint32 volume_ids = 3;
  49. }
  50. ErasureCoding erasure_coding = 1;
  51. }
  52. message ClientListenRequest {
  53. string name = 1;
  54. }
  55. message VolumeLocation {
  56. string url = 1;
  57. string public_url = 2;
  58. repeated uint32 new_vids = 3;
  59. repeated uint32 deleted_vids = 4;
  60. }