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.

209 lines
8.7 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
  2. package mq_pb
  3. import (
  4. context "context"
  5. grpc "google.golang.org/grpc"
  6. codes "google.golang.org/grpc/codes"
  7. status "google.golang.org/grpc/status"
  8. )
  9. // This is a compile-time assertion to ensure that this generated file
  10. // is compatible with the grpc package it is being compiled against.
  11. // Requires gRPC-Go v1.32.0 or later.
  12. const _ = grpc.SupportPackageIsVersion7
  13. // SeaweedMessagingClient is the client API for SeaweedMessaging service.
  14. //
  15. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
  16. type SeaweedMessagingClient interface {
  17. FindBrokerLeader(ctx context.Context, in *FindBrokerLeaderRequest, opts ...grpc.CallOption) (*FindBrokerLeaderResponse, error)
  18. AssignSegmentBrokers(ctx context.Context, in *AssignSegmentBrokersRequest, opts ...grpc.CallOption) (*AssignSegmentBrokersResponse, error)
  19. CheckSegmentStatus(ctx context.Context, in *CheckSegmentStatusRequest, opts ...grpc.CallOption) (*CheckSegmentStatusResponse, error)
  20. CheckBrokerLoad(ctx context.Context, in *CheckBrokerLoadRequest, opts ...grpc.CallOption) (*CheckBrokerLoadResponse, error)
  21. }
  22. type seaweedMessagingClient struct {
  23. cc grpc.ClientConnInterface
  24. }
  25. func NewSeaweedMessagingClient(cc grpc.ClientConnInterface) SeaweedMessagingClient {
  26. return &seaweedMessagingClient{cc}
  27. }
  28. func (c *seaweedMessagingClient) FindBrokerLeader(ctx context.Context, in *FindBrokerLeaderRequest, opts ...grpc.CallOption) (*FindBrokerLeaderResponse, error) {
  29. out := new(FindBrokerLeaderResponse)
  30. err := c.cc.Invoke(ctx, "/messaging_pb.SeaweedMessaging/FindBrokerLeader", in, out, opts...)
  31. if err != nil {
  32. return nil, err
  33. }
  34. return out, nil
  35. }
  36. func (c *seaweedMessagingClient) AssignSegmentBrokers(ctx context.Context, in *AssignSegmentBrokersRequest, opts ...grpc.CallOption) (*AssignSegmentBrokersResponse, error) {
  37. out := new(AssignSegmentBrokersResponse)
  38. err := c.cc.Invoke(ctx, "/messaging_pb.SeaweedMessaging/AssignSegmentBrokers", in, out, opts...)
  39. if err != nil {
  40. return nil, err
  41. }
  42. return out, nil
  43. }
  44. func (c *seaweedMessagingClient) CheckSegmentStatus(ctx context.Context, in *CheckSegmentStatusRequest, opts ...grpc.CallOption) (*CheckSegmentStatusResponse, error) {
  45. out := new(CheckSegmentStatusResponse)
  46. err := c.cc.Invoke(ctx, "/messaging_pb.SeaweedMessaging/CheckSegmentStatus", in, out, opts...)
  47. if err != nil {
  48. return nil, err
  49. }
  50. return out, nil
  51. }
  52. func (c *seaweedMessagingClient) CheckBrokerLoad(ctx context.Context, in *CheckBrokerLoadRequest, opts ...grpc.CallOption) (*CheckBrokerLoadResponse, error) {
  53. out := new(CheckBrokerLoadResponse)
  54. err := c.cc.Invoke(ctx, "/messaging_pb.SeaweedMessaging/CheckBrokerLoad", in, out, opts...)
  55. if err != nil {
  56. return nil, err
  57. }
  58. return out, nil
  59. }
  60. // SeaweedMessagingServer is the server API for SeaweedMessaging service.
  61. // All implementations must embed UnimplementedSeaweedMessagingServer
  62. // for forward compatibility
  63. type SeaweedMessagingServer interface {
  64. FindBrokerLeader(context.Context, *FindBrokerLeaderRequest) (*FindBrokerLeaderResponse, error)
  65. AssignSegmentBrokers(context.Context, *AssignSegmentBrokersRequest) (*AssignSegmentBrokersResponse, error)
  66. CheckSegmentStatus(context.Context, *CheckSegmentStatusRequest) (*CheckSegmentStatusResponse, error)
  67. CheckBrokerLoad(context.Context, *CheckBrokerLoadRequest) (*CheckBrokerLoadResponse, error)
  68. mustEmbedUnimplementedSeaweedMessagingServer()
  69. }
  70. // UnimplementedSeaweedMessagingServer must be embedded to have forward compatible implementations.
  71. type UnimplementedSeaweedMessagingServer struct {
  72. }
  73. func (UnimplementedSeaweedMessagingServer) FindBrokerLeader(context.Context, *FindBrokerLeaderRequest) (*FindBrokerLeaderResponse, error) {
  74. return nil, status.Errorf(codes.Unimplemented, "method FindBrokerLeader not implemented")
  75. }
  76. func (UnimplementedSeaweedMessagingServer) AssignSegmentBrokers(context.Context, *AssignSegmentBrokersRequest) (*AssignSegmentBrokersResponse, error) {
  77. return nil, status.Errorf(codes.Unimplemented, "method AssignSegmentBrokers not implemented")
  78. }
  79. func (UnimplementedSeaweedMessagingServer) CheckSegmentStatus(context.Context, *CheckSegmentStatusRequest) (*CheckSegmentStatusResponse, error) {
  80. return nil, status.Errorf(codes.Unimplemented, "method CheckSegmentStatus not implemented")
  81. }
  82. func (UnimplementedSeaweedMessagingServer) CheckBrokerLoad(context.Context, *CheckBrokerLoadRequest) (*CheckBrokerLoadResponse, error) {
  83. return nil, status.Errorf(codes.Unimplemented, "method CheckBrokerLoad not implemented")
  84. }
  85. func (UnimplementedSeaweedMessagingServer) mustEmbedUnimplementedSeaweedMessagingServer() {}
  86. // UnsafeSeaweedMessagingServer may be embedded to opt out of forward compatibility for this service.
  87. // Use of this interface is not recommended, as added methods to SeaweedMessagingServer will
  88. // result in compilation errors.
  89. type UnsafeSeaweedMessagingServer interface {
  90. mustEmbedUnimplementedSeaweedMessagingServer()
  91. }
  92. func RegisterSeaweedMessagingServer(s grpc.ServiceRegistrar, srv SeaweedMessagingServer) {
  93. s.RegisterService(&SeaweedMessaging_ServiceDesc, srv)
  94. }
  95. func _SeaweedMessaging_FindBrokerLeader_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  96. in := new(FindBrokerLeaderRequest)
  97. if err := dec(in); err != nil {
  98. return nil, err
  99. }
  100. if interceptor == nil {
  101. return srv.(SeaweedMessagingServer).FindBrokerLeader(ctx, in)
  102. }
  103. info := &grpc.UnaryServerInfo{
  104. Server: srv,
  105. FullMethod: "/messaging_pb.SeaweedMessaging/FindBrokerLeader",
  106. }
  107. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  108. return srv.(SeaweedMessagingServer).FindBrokerLeader(ctx, req.(*FindBrokerLeaderRequest))
  109. }
  110. return interceptor(ctx, in, info, handler)
  111. }
  112. func _SeaweedMessaging_AssignSegmentBrokers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  113. in := new(AssignSegmentBrokersRequest)
  114. if err := dec(in); err != nil {
  115. return nil, err
  116. }
  117. if interceptor == nil {
  118. return srv.(SeaweedMessagingServer).AssignSegmentBrokers(ctx, in)
  119. }
  120. info := &grpc.UnaryServerInfo{
  121. Server: srv,
  122. FullMethod: "/messaging_pb.SeaweedMessaging/AssignSegmentBrokers",
  123. }
  124. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  125. return srv.(SeaweedMessagingServer).AssignSegmentBrokers(ctx, req.(*AssignSegmentBrokersRequest))
  126. }
  127. return interceptor(ctx, in, info, handler)
  128. }
  129. func _SeaweedMessaging_CheckSegmentStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  130. in := new(CheckSegmentStatusRequest)
  131. if err := dec(in); err != nil {
  132. return nil, err
  133. }
  134. if interceptor == nil {
  135. return srv.(SeaweedMessagingServer).CheckSegmentStatus(ctx, in)
  136. }
  137. info := &grpc.UnaryServerInfo{
  138. Server: srv,
  139. FullMethod: "/messaging_pb.SeaweedMessaging/CheckSegmentStatus",
  140. }
  141. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  142. return srv.(SeaweedMessagingServer).CheckSegmentStatus(ctx, req.(*CheckSegmentStatusRequest))
  143. }
  144. return interceptor(ctx, in, info, handler)
  145. }
  146. func _SeaweedMessaging_CheckBrokerLoad_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  147. in := new(CheckBrokerLoadRequest)
  148. if err := dec(in); err != nil {
  149. return nil, err
  150. }
  151. if interceptor == nil {
  152. return srv.(SeaweedMessagingServer).CheckBrokerLoad(ctx, in)
  153. }
  154. info := &grpc.UnaryServerInfo{
  155. Server: srv,
  156. FullMethod: "/messaging_pb.SeaweedMessaging/CheckBrokerLoad",
  157. }
  158. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  159. return srv.(SeaweedMessagingServer).CheckBrokerLoad(ctx, req.(*CheckBrokerLoadRequest))
  160. }
  161. return interceptor(ctx, in, info, handler)
  162. }
  163. // SeaweedMessaging_ServiceDesc is the grpc.ServiceDesc for SeaweedMessaging service.
  164. // It's only intended for direct use with grpc.RegisterService,
  165. // and not to be introspected or modified (even as a copy)
  166. var SeaweedMessaging_ServiceDesc = grpc.ServiceDesc{
  167. ServiceName: "messaging_pb.SeaweedMessaging",
  168. HandlerType: (*SeaweedMessagingServer)(nil),
  169. Methods: []grpc.MethodDesc{
  170. {
  171. MethodName: "FindBrokerLeader",
  172. Handler: _SeaweedMessaging_FindBrokerLeader_Handler,
  173. },
  174. {
  175. MethodName: "AssignSegmentBrokers",
  176. Handler: _SeaweedMessaging_AssignSegmentBrokers_Handler,
  177. },
  178. {
  179. MethodName: "CheckSegmentStatus",
  180. Handler: _SeaweedMessaging_CheckSegmentStatus_Handler,
  181. },
  182. {
  183. MethodName: "CheckBrokerLoad",
  184. Handler: _SeaweedMessaging_CheckBrokerLoad_Handler,
  185. },
  186. },
  187. Streams: []grpc.StreamDesc{},
  188. Metadata: "mq.proto",
  189. }