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.

80 lines
1.7 KiB

3 years ago
2 years ago
2 years ago
2 years ago
  1. syntax = "proto3";
  2. package messaging_pb;
  3. option go_package = "github.com/seaweedfs/seaweedfs/weed/pb/mq_pb";
  4. option java_package = "seaweedfs.mq";
  5. option java_outer_classname = "MessagQueueProto";
  6. //////////////////////////////////////////////////
  7. service SeaweedMessaging {
  8. rpc FindBrokerLeader (FindBrokerLeaderRequest) returns (FindBrokerLeaderResponse) {
  9. }
  10. rpc AssignSegmentBrokers (AssignSegmentBrokersRequest) returns (AssignSegmentBrokersResponse) {
  11. }
  12. rpc CheckSegmentStatus (CheckSegmentStatusRequest) returns (CheckSegmentStatusResponse) {
  13. }
  14. rpc CheckBrokerLoad (CheckBrokerLoadRequest) returns (CheckBrokerLoadResponse) {
  15. }
  16. }
  17. //////////////////////////////////////////////////
  18. message SegmentInfo {
  19. Segment segment = 1;
  20. int64 start_ts_ns = 2;
  21. repeated string brokers = 3;
  22. int64 stop_ts_ns = 4;
  23. repeated int32 previous_segments = 5;
  24. repeated int32 next_segments = 6;
  25. }
  26. //////////////////////////////////////////////////
  27. message FindBrokerLeaderRequest {
  28. string filer_group = 1;
  29. }
  30. message FindBrokerLeaderResponse {
  31. string broker = 1;
  32. }
  33. message Partition {
  34. int32 ring_size = 1;
  35. int32 range_start = 2;
  36. int32 range_stop = 3;
  37. }
  38. message Segment {
  39. string namespace = 1;
  40. string topic = 2;
  41. int32 id = 3;
  42. Partition partition = 4;
  43. }
  44. message AssignSegmentBrokersRequest {
  45. Segment segment = 1;
  46. }
  47. message AssignSegmentBrokersResponse {
  48. repeated string brokers = 1;
  49. }
  50. message CheckSegmentStatusRequest {
  51. Segment segment = 1;
  52. }
  53. message CheckSegmentStatusResponse {
  54. bool is_active = 1;
  55. }
  56. message CheckBrokerLoadRequest {
  57. }
  58. message CheckBrokerLoadResponse {
  59. int64 message_count = 1;
  60. int64 bytes_count = 2;
  61. }