mq_grpc.pb.go 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675
  1. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
  2. // versions:
  3. // - protoc-gen-go-grpc v1.2.0
  4. // - protoc v4.23.3
  5. // source: mq.proto
  6. package mq_pb
  7. import (
  8. context "context"
  9. grpc "google.golang.org/grpc"
  10. codes "google.golang.org/grpc/codes"
  11. status "google.golang.org/grpc/status"
  12. )
  13. // This is a compile-time assertion to ensure that this generated file
  14. // is compatible with the grpc package it is being compiled against.
  15. // Requires gRPC-Go v1.32.0 or later.
  16. const _ = grpc.SupportPackageIsVersion7
  17. // SeaweedMessagingClient is the client API for SeaweedMessaging service.
  18. //
  19. // 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.
  20. type SeaweedMessagingClient interface {
  21. // control plane
  22. FindBrokerLeader(ctx context.Context, in *FindBrokerLeaderRequest, opts ...grpc.CallOption) (*FindBrokerLeaderResponse, error)
  23. AssignSegmentBrokers(ctx context.Context, in *AssignSegmentBrokersRequest, opts ...grpc.CallOption) (*AssignSegmentBrokersResponse, error)
  24. CheckSegmentStatus(ctx context.Context, in *CheckSegmentStatusRequest, opts ...grpc.CallOption) (*CheckSegmentStatusResponse, error)
  25. CheckBrokerLoad(ctx context.Context, in *CheckBrokerLoadRequest, opts ...grpc.CallOption) (*CheckBrokerLoadResponse, error)
  26. // control plane for balancer
  27. ConnectToBalancer(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_ConnectToBalancerClient, error)
  28. // control plane for topic partitions
  29. LookupTopicBrokers(ctx context.Context, in *LookupTopicBrokersRequest, opts ...grpc.CallOption) (*LookupTopicBrokersResponse, error)
  30. CreateTopic(ctx context.Context, in *CreateTopicRequest, opts ...grpc.CallOption) (*CreateTopicResponse, error)
  31. DoCreateTopic(ctx context.Context, in *DoCreateTopicRequest, opts ...grpc.CallOption) (*DoCreateTopicResponse, error)
  32. ListTopics(ctx context.Context, in *ListTopicsRequest, opts ...grpc.CallOption) (*ListTopicsResponse, error)
  33. // a pub client will call this to get the topic partitions assignment
  34. RequestTopicPartitions(ctx context.Context, in *RequestTopicPartitionsRequest, opts ...grpc.CallOption) (*RequestTopicPartitionsResponse, error)
  35. AssignTopicPartitions(ctx context.Context, in *AssignTopicPartitionsRequest, opts ...grpc.CallOption) (*AssignTopicPartitionsResponse, error)
  36. CheckTopicPartitionsStatus(ctx context.Context, in *CheckTopicPartitionsStatusRequest, opts ...grpc.CallOption) (*CheckTopicPartitionsStatusResponse, error)
  37. // data plane
  38. Publish(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_PublishClient, error)
  39. Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (SeaweedMessaging_SubscribeClient, error)
  40. }
  41. type seaweedMessagingClient struct {
  42. cc grpc.ClientConnInterface
  43. }
  44. func NewSeaweedMessagingClient(cc grpc.ClientConnInterface) SeaweedMessagingClient {
  45. return &seaweedMessagingClient{cc}
  46. }
  47. func (c *seaweedMessagingClient) FindBrokerLeader(ctx context.Context, in *FindBrokerLeaderRequest, opts ...grpc.CallOption) (*FindBrokerLeaderResponse, error) {
  48. out := new(FindBrokerLeaderResponse)
  49. err := c.cc.Invoke(ctx, "/messaging_pb.SeaweedMessaging/FindBrokerLeader", in, out, opts...)
  50. if err != nil {
  51. return nil, err
  52. }
  53. return out, nil
  54. }
  55. func (c *seaweedMessagingClient) AssignSegmentBrokers(ctx context.Context, in *AssignSegmentBrokersRequest, opts ...grpc.CallOption) (*AssignSegmentBrokersResponse, error) {
  56. out := new(AssignSegmentBrokersResponse)
  57. err := c.cc.Invoke(ctx, "/messaging_pb.SeaweedMessaging/AssignSegmentBrokers", in, out, opts...)
  58. if err != nil {
  59. return nil, err
  60. }
  61. return out, nil
  62. }
  63. func (c *seaweedMessagingClient) CheckSegmentStatus(ctx context.Context, in *CheckSegmentStatusRequest, opts ...grpc.CallOption) (*CheckSegmentStatusResponse, error) {
  64. out := new(CheckSegmentStatusResponse)
  65. err := c.cc.Invoke(ctx, "/messaging_pb.SeaweedMessaging/CheckSegmentStatus", in, out, opts...)
  66. if err != nil {
  67. return nil, err
  68. }
  69. return out, nil
  70. }
  71. func (c *seaweedMessagingClient) CheckBrokerLoad(ctx context.Context, in *CheckBrokerLoadRequest, opts ...grpc.CallOption) (*CheckBrokerLoadResponse, error) {
  72. out := new(CheckBrokerLoadResponse)
  73. err := c.cc.Invoke(ctx, "/messaging_pb.SeaweedMessaging/CheckBrokerLoad", in, out, opts...)
  74. if err != nil {
  75. return nil, err
  76. }
  77. return out, nil
  78. }
  79. func (c *seaweedMessagingClient) ConnectToBalancer(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_ConnectToBalancerClient, error) {
  80. stream, err := c.cc.NewStream(ctx, &SeaweedMessaging_ServiceDesc.Streams[0], "/messaging_pb.SeaweedMessaging/ConnectToBalancer", opts...)
  81. if err != nil {
  82. return nil, err
  83. }
  84. x := &seaweedMessagingConnectToBalancerClient{stream}
  85. return x, nil
  86. }
  87. type SeaweedMessaging_ConnectToBalancerClient interface {
  88. Send(*ConnectToBalancerRequest) error
  89. Recv() (*ConnectToBalancerResponse, error)
  90. grpc.ClientStream
  91. }
  92. type seaweedMessagingConnectToBalancerClient struct {
  93. grpc.ClientStream
  94. }
  95. func (x *seaweedMessagingConnectToBalancerClient) Send(m *ConnectToBalancerRequest) error {
  96. return x.ClientStream.SendMsg(m)
  97. }
  98. func (x *seaweedMessagingConnectToBalancerClient) Recv() (*ConnectToBalancerResponse, error) {
  99. m := new(ConnectToBalancerResponse)
  100. if err := x.ClientStream.RecvMsg(m); err != nil {
  101. return nil, err
  102. }
  103. return m, nil
  104. }
  105. func (c *seaweedMessagingClient) LookupTopicBrokers(ctx context.Context, in *LookupTopicBrokersRequest, opts ...grpc.CallOption) (*LookupTopicBrokersResponse, error) {
  106. out := new(LookupTopicBrokersResponse)
  107. err := c.cc.Invoke(ctx, "/messaging_pb.SeaweedMessaging/LookupTopicBrokers", in, out, opts...)
  108. if err != nil {
  109. return nil, err
  110. }
  111. return out, nil
  112. }
  113. func (c *seaweedMessagingClient) CreateTopic(ctx context.Context, in *CreateTopicRequest, opts ...grpc.CallOption) (*CreateTopicResponse, error) {
  114. out := new(CreateTopicResponse)
  115. err := c.cc.Invoke(ctx, "/messaging_pb.SeaweedMessaging/CreateTopic", in, out, opts...)
  116. if err != nil {
  117. return nil, err
  118. }
  119. return out, nil
  120. }
  121. func (c *seaweedMessagingClient) DoCreateTopic(ctx context.Context, in *DoCreateTopicRequest, opts ...grpc.CallOption) (*DoCreateTopicResponse, error) {
  122. out := new(DoCreateTopicResponse)
  123. err := c.cc.Invoke(ctx, "/messaging_pb.SeaweedMessaging/DoCreateTopic", in, out, opts...)
  124. if err != nil {
  125. return nil, err
  126. }
  127. return out, nil
  128. }
  129. func (c *seaweedMessagingClient) ListTopics(ctx context.Context, in *ListTopicsRequest, opts ...grpc.CallOption) (*ListTopicsResponse, error) {
  130. out := new(ListTopicsResponse)
  131. err := c.cc.Invoke(ctx, "/messaging_pb.SeaweedMessaging/ListTopics", in, out, opts...)
  132. if err != nil {
  133. return nil, err
  134. }
  135. return out, nil
  136. }
  137. func (c *seaweedMessagingClient) RequestTopicPartitions(ctx context.Context, in *RequestTopicPartitionsRequest, opts ...grpc.CallOption) (*RequestTopicPartitionsResponse, error) {
  138. out := new(RequestTopicPartitionsResponse)
  139. err := c.cc.Invoke(ctx, "/messaging_pb.SeaweedMessaging/RequestTopicPartitions", in, out, opts...)
  140. if err != nil {
  141. return nil, err
  142. }
  143. return out, nil
  144. }
  145. func (c *seaweedMessagingClient) AssignTopicPartitions(ctx context.Context, in *AssignTopicPartitionsRequest, opts ...grpc.CallOption) (*AssignTopicPartitionsResponse, error) {
  146. out := new(AssignTopicPartitionsResponse)
  147. err := c.cc.Invoke(ctx, "/messaging_pb.SeaweedMessaging/AssignTopicPartitions", in, out, opts...)
  148. if err != nil {
  149. return nil, err
  150. }
  151. return out, nil
  152. }
  153. func (c *seaweedMessagingClient) CheckTopicPartitionsStatus(ctx context.Context, in *CheckTopicPartitionsStatusRequest, opts ...grpc.CallOption) (*CheckTopicPartitionsStatusResponse, error) {
  154. out := new(CheckTopicPartitionsStatusResponse)
  155. err := c.cc.Invoke(ctx, "/messaging_pb.SeaweedMessaging/CheckTopicPartitionsStatus", in, out, opts...)
  156. if err != nil {
  157. return nil, err
  158. }
  159. return out, nil
  160. }
  161. func (c *seaweedMessagingClient) Publish(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_PublishClient, error) {
  162. stream, err := c.cc.NewStream(ctx, &SeaweedMessaging_ServiceDesc.Streams[1], "/messaging_pb.SeaweedMessaging/Publish", opts...)
  163. if err != nil {
  164. return nil, err
  165. }
  166. x := &seaweedMessagingPublishClient{stream}
  167. return x, nil
  168. }
  169. type SeaweedMessaging_PublishClient interface {
  170. Send(*PublishRequest) error
  171. Recv() (*PublishResponse, error)
  172. grpc.ClientStream
  173. }
  174. type seaweedMessagingPublishClient struct {
  175. grpc.ClientStream
  176. }
  177. func (x *seaweedMessagingPublishClient) Send(m *PublishRequest) error {
  178. return x.ClientStream.SendMsg(m)
  179. }
  180. func (x *seaweedMessagingPublishClient) Recv() (*PublishResponse, error) {
  181. m := new(PublishResponse)
  182. if err := x.ClientStream.RecvMsg(m); err != nil {
  183. return nil, err
  184. }
  185. return m, nil
  186. }
  187. func (c *seaweedMessagingClient) Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (SeaweedMessaging_SubscribeClient, error) {
  188. stream, err := c.cc.NewStream(ctx, &SeaweedMessaging_ServiceDesc.Streams[2], "/messaging_pb.SeaweedMessaging/Subscribe", opts...)
  189. if err != nil {
  190. return nil, err
  191. }
  192. x := &seaweedMessagingSubscribeClient{stream}
  193. if err := x.ClientStream.SendMsg(in); err != nil {
  194. return nil, err
  195. }
  196. if err := x.ClientStream.CloseSend(); err != nil {
  197. return nil, err
  198. }
  199. return x, nil
  200. }
  201. type SeaweedMessaging_SubscribeClient interface {
  202. Recv() (*SubscribeResponse, error)
  203. grpc.ClientStream
  204. }
  205. type seaweedMessagingSubscribeClient struct {
  206. grpc.ClientStream
  207. }
  208. func (x *seaweedMessagingSubscribeClient) Recv() (*SubscribeResponse, error) {
  209. m := new(SubscribeResponse)
  210. if err := x.ClientStream.RecvMsg(m); err != nil {
  211. return nil, err
  212. }
  213. return m, nil
  214. }
  215. // SeaweedMessagingServer is the server API for SeaweedMessaging service.
  216. // All implementations must embed UnimplementedSeaweedMessagingServer
  217. // for forward compatibility
  218. type SeaweedMessagingServer interface {
  219. // control plane
  220. FindBrokerLeader(context.Context, *FindBrokerLeaderRequest) (*FindBrokerLeaderResponse, error)
  221. AssignSegmentBrokers(context.Context, *AssignSegmentBrokersRequest) (*AssignSegmentBrokersResponse, error)
  222. CheckSegmentStatus(context.Context, *CheckSegmentStatusRequest) (*CheckSegmentStatusResponse, error)
  223. CheckBrokerLoad(context.Context, *CheckBrokerLoadRequest) (*CheckBrokerLoadResponse, error)
  224. // control plane for balancer
  225. ConnectToBalancer(SeaweedMessaging_ConnectToBalancerServer) error
  226. // control plane for topic partitions
  227. LookupTopicBrokers(context.Context, *LookupTopicBrokersRequest) (*LookupTopicBrokersResponse, error)
  228. CreateTopic(context.Context, *CreateTopicRequest) (*CreateTopicResponse, error)
  229. DoCreateTopic(context.Context, *DoCreateTopicRequest) (*DoCreateTopicResponse, error)
  230. ListTopics(context.Context, *ListTopicsRequest) (*ListTopicsResponse, error)
  231. // a pub client will call this to get the topic partitions assignment
  232. RequestTopicPartitions(context.Context, *RequestTopicPartitionsRequest) (*RequestTopicPartitionsResponse, error)
  233. AssignTopicPartitions(context.Context, *AssignTopicPartitionsRequest) (*AssignTopicPartitionsResponse, error)
  234. CheckTopicPartitionsStatus(context.Context, *CheckTopicPartitionsStatusRequest) (*CheckTopicPartitionsStatusResponse, error)
  235. // data plane
  236. Publish(SeaweedMessaging_PublishServer) error
  237. Subscribe(*SubscribeRequest, SeaweedMessaging_SubscribeServer) error
  238. mustEmbedUnimplementedSeaweedMessagingServer()
  239. }
  240. // UnimplementedSeaweedMessagingServer must be embedded to have forward compatible implementations.
  241. type UnimplementedSeaweedMessagingServer struct {
  242. }
  243. func (UnimplementedSeaweedMessagingServer) FindBrokerLeader(context.Context, *FindBrokerLeaderRequest) (*FindBrokerLeaderResponse, error) {
  244. return nil, status.Errorf(codes.Unimplemented, "method FindBrokerLeader not implemented")
  245. }
  246. func (UnimplementedSeaweedMessagingServer) AssignSegmentBrokers(context.Context, *AssignSegmentBrokersRequest) (*AssignSegmentBrokersResponse, error) {
  247. return nil, status.Errorf(codes.Unimplemented, "method AssignSegmentBrokers not implemented")
  248. }
  249. func (UnimplementedSeaweedMessagingServer) CheckSegmentStatus(context.Context, *CheckSegmentStatusRequest) (*CheckSegmentStatusResponse, error) {
  250. return nil, status.Errorf(codes.Unimplemented, "method CheckSegmentStatus not implemented")
  251. }
  252. func (UnimplementedSeaweedMessagingServer) CheckBrokerLoad(context.Context, *CheckBrokerLoadRequest) (*CheckBrokerLoadResponse, error) {
  253. return nil, status.Errorf(codes.Unimplemented, "method CheckBrokerLoad not implemented")
  254. }
  255. func (UnimplementedSeaweedMessagingServer) ConnectToBalancer(SeaweedMessaging_ConnectToBalancerServer) error {
  256. return status.Errorf(codes.Unimplemented, "method ConnectToBalancer not implemented")
  257. }
  258. func (UnimplementedSeaweedMessagingServer) LookupTopicBrokers(context.Context, *LookupTopicBrokersRequest) (*LookupTopicBrokersResponse, error) {
  259. return nil, status.Errorf(codes.Unimplemented, "method LookupTopicBrokers not implemented")
  260. }
  261. func (UnimplementedSeaweedMessagingServer) CreateTopic(context.Context, *CreateTopicRequest) (*CreateTopicResponse, error) {
  262. return nil, status.Errorf(codes.Unimplemented, "method CreateTopic not implemented")
  263. }
  264. func (UnimplementedSeaweedMessagingServer) DoCreateTopic(context.Context, *DoCreateTopicRequest) (*DoCreateTopicResponse, error) {
  265. return nil, status.Errorf(codes.Unimplemented, "method DoCreateTopic not implemented")
  266. }
  267. func (UnimplementedSeaweedMessagingServer) ListTopics(context.Context, *ListTopicsRequest) (*ListTopicsResponse, error) {
  268. return nil, status.Errorf(codes.Unimplemented, "method ListTopics not implemented")
  269. }
  270. func (UnimplementedSeaweedMessagingServer) RequestTopicPartitions(context.Context, *RequestTopicPartitionsRequest) (*RequestTopicPartitionsResponse, error) {
  271. return nil, status.Errorf(codes.Unimplemented, "method RequestTopicPartitions not implemented")
  272. }
  273. func (UnimplementedSeaweedMessagingServer) AssignTopicPartitions(context.Context, *AssignTopicPartitionsRequest) (*AssignTopicPartitionsResponse, error) {
  274. return nil, status.Errorf(codes.Unimplemented, "method AssignTopicPartitions not implemented")
  275. }
  276. func (UnimplementedSeaweedMessagingServer) CheckTopicPartitionsStatus(context.Context, *CheckTopicPartitionsStatusRequest) (*CheckTopicPartitionsStatusResponse, error) {
  277. return nil, status.Errorf(codes.Unimplemented, "method CheckTopicPartitionsStatus not implemented")
  278. }
  279. func (UnimplementedSeaweedMessagingServer) Publish(SeaweedMessaging_PublishServer) error {
  280. return status.Errorf(codes.Unimplemented, "method Publish not implemented")
  281. }
  282. func (UnimplementedSeaweedMessagingServer) Subscribe(*SubscribeRequest, SeaweedMessaging_SubscribeServer) error {
  283. return status.Errorf(codes.Unimplemented, "method Subscribe not implemented")
  284. }
  285. func (UnimplementedSeaweedMessagingServer) mustEmbedUnimplementedSeaweedMessagingServer() {}
  286. // UnsafeSeaweedMessagingServer may be embedded to opt out of forward compatibility for this service.
  287. // Use of this interface is not recommended, as added methods to SeaweedMessagingServer will
  288. // result in compilation errors.
  289. type UnsafeSeaweedMessagingServer interface {
  290. mustEmbedUnimplementedSeaweedMessagingServer()
  291. }
  292. func RegisterSeaweedMessagingServer(s grpc.ServiceRegistrar, srv SeaweedMessagingServer) {
  293. s.RegisterService(&SeaweedMessaging_ServiceDesc, srv)
  294. }
  295. func _SeaweedMessaging_FindBrokerLeader_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  296. in := new(FindBrokerLeaderRequest)
  297. if err := dec(in); err != nil {
  298. return nil, err
  299. }
  300. if interceptor == nil {
  301. return srv.(SeaweedMessagingServer).FindBrokerLeader(ctx, in)
  302. }
  303. info := &grpc.UnaryServerInfo{
  304. Server: srv,
  305. FullMethod: "/messaging_pb.SeaweedMessaging/FindBrokerLeader",
  306. }
  307. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  308. return srv.(SeaweedMessagingServer).FindBrokerLeader(ctx, req.(*FindBrokerLeaderRequest))
  309. }
  310. return interceptor(ctx, in, info, handler)
  311. }
  312. func _SeaweedMessaging_AssignSegmentBrokers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  313. in := new(AssignSegmentBrokersRequest)
  314. if err := dec(in); err != nil {
  315. return nil, err
  316. }
  317. if interceptor == nil {
  318. return srv.(SeaweedMessagingServer).AssignSegmentBrokers(ctx, in)
  319. }
  320. info := &grpc.UnaryServerInfo{
  321. Server: srv,
  322. FullMethod: "/messaging_pb.SeaweedMessaging/AssignSegmentBrokers",
  323. }
  324. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  325. return srv.(SeaweedMessagingServer).AssignSegmentBrokers(ctx, req.(*AssignSegmentBrokersRequest))
  326. }
  327. return interceptor(ctx, in, info, handler)
  328. }
  329. func _SeaweedMessaging_CheckSegmentStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  330. in := new(CheckSegmentStatusRequest)
  331. if err := dec(in); err != nil {
  332. return nil, err
  333. }
  334. if interceptor == nil {
  335. return srv.(SeaweedMessagingServer).CheckSegmentStatus(ctx, in)
  336. }
  337. info := &grpc.UnaryServerInfo{
  338. Server: srv,
  339. FullMethod: "/messaging_pb.SeaweedMessaging/CheckSegmentStatus",
  340. }
  341. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  342. return srv.(SeaweedMessagingServer).CheckSegmentStatus(ctx, req.(*CheckSegmentStatusRequest))
  343. }
  344. return interceptor(ctx, in, info, handler)
  345. }
  346. func _SeaweedMessaging_CheckBrokerLoad_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  347. in := new(CheckBrokerLoadRequest)
  348. if err := dec(in); err != nil {
  349. return nil, err
  350. }
  351. if interceptor == nil {
  352. return srv.(SeaweedMessagingServer).CheckBrokerLoad(ctx, in)
  353. }
  354. info := &grpc.UnaryServerInfo{
  355. Server: srv,
  356. FullMethod: "/messaging_pb.SeaweedMessaging/CheckBrokerLoad",
  357. }
  358. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  359. return srv.(SeaweedMessagingServer).CheckBrokerLoad(ctx, req.(*CheckBrokerLoadRequest))
  360. }
  361. return interceptor(ctx, in, info, handler)
  362. }
  363. func _SeaweedMessaging_ConnectToBalancer_Handler(srv interface{}, stream grpc.ServerStream) error {
  364. return srv.(SeaweedMessagingServer).ConnectToBalancer(&seaweedMessagingConnectToBalancerServer{stream})
  365. }
  366. type SeaweedMessaging_ConnectToBalancerServer interface {
  367. Send(*ConnectToBalancerResponse) error
  368. Recv() (*ConnectToBalancerRequest, error)
  369. grpc.ServerStream
  370. }
  371. type seaweedMessagingConnectToBalancerServer struct {
  372. grpc.ServerStream
  373. }
  374. func (x *seaweedMessagingConnectToBalancerServer) Send(m *ConnectToBalancerResponse) error {
  375. return x.ServerStream.SendMsg(m)
  376. }
  377. func (x *seaweedMessagingConnectToBalancerServer) Recv() (*ConnectToBalancerRequest, error) {
  378. m := new(ConnectToBalancerRequest)
  379. if err := x.ServerStream.RecvMsg(m); err != nil {
  380. return nil, err
  381. }
  382. return m, nil
  383. }
  384. func _SeaweedMessaging_LookupTopicBrokers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  385. in := new(LookupTopicBrokersRequest)
  386. if err := dec(in); err != nil {
  387. return nil, err
  388. }
  389. if interceptor == nil {
  390. return srv.(SeaweedMessagingServer).LookupTopicBrokers(ctx, in)
  391. }
  392. info := &grpc.UnaryServerInfo{
  393. Server: srv,
  394. FullMethod: "/messaging_pb.SeaweedMessaging/LookupTopicBrokers",
  395. }
  396. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  397. return srv.(SeaweedMessagingServer).LookupTopicBrokers(ctx, req.(*LookupTopicBrokersRequest))
  398. }
  399. return interceptor(ctx, in, info, handler)
  400. }
  401. func _SeaweedMessaging_CreateTopic_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  402. in := new(CreateTopicRequest)
  403. if err := dec(in); err != nil {
  404. return nil, err
  405. }
  406. if interceptor == nil {
  407. return srv.(SeaweedMessagingServer).CreateTopic(ctx, in)
  408. }
  409. info := &grpc.UnaryServerInfo{
  410. Server: srv,
  411. FullMethod: "/messaging_pb.SeaweedMessaging/CreateTopic",
  412. }
  413. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  414. return srv.(SeaweedMessagingServer).CreateTopic(ctx, req.(*CreateTopicRequest))
  415. }
  416. return interceptor(ctx, in, info, handler)
  417. }
  418. func _SeaweedMessaging_DoCreateTopic_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  419. in := new(DoCreateTopicRequest)
  420. if err := dec(in); err != nil {
  421. return nil, err
  422. }
  423. if interceptor == nil {
  424. return srv.(SeaweedMessagingServer).DoCreateTopic(ctx, in)
  425. }
  426. info := &grpc.UnaryServerInfo{
  427. Server: srv,
  428. FullMethod: "/messaging_pb.SeaweedMessaging/DoCreateTopic",
  429. }
  430. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  431. return srv.(SeaweedMessagingServer).DoCreateTopic(ctx, req.(*DoCreateTopicRequest))
  432. }
  433. return interceptor(ctx, in, info, handler)
  434. }
  435. func _SeaweedMessaging_ListTopics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  436. in := new(ListTopicsRequest)
  437. if err := dec(in); err != nil {
  438. return nil, err
  439. }
  440. if interceptor == nil {
  441. return srv.(SeaweedMessagingServer).ListTopics(ctx, in)
  442. }
  443. info := &grpc.UnaryServerInfo{
  444. Server: srv,
  445. FullMethod: "/messaging_pb.SeaweedMessaging/ListTopics",
  446. }
  447. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  448. return srv.(SeaweedMessagingServer).ListTopics(ctx, req.(*ListTopicsRequest))
  449. }
  450. return interceptor(ctx, in, info, handler)
  451. }
  452. func _SeaweedMessaging_RequestTopicPartitions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  453. in := new(RequestTopicPartitionsRequest)
  454. if err := dec(in); err != nil {
  455. return nil, err
  456. }
  457. if interceptor == nil {
  458. return srv.(SeaweedMessagingServer).RequestTopicPartitions(ctx, in)
  459. }
  460. info := &grpc.UnaryServerInfo{
  461. Server: srv,
  462. FullMethod: "/messaging_pb.SeaweedMessaging/RequestTopicPartitions",
  463. }
  464. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  465. return srv.(SeaweedMessagingServer).RequestTopicPartitions(ctx, req.(*RequestTopicPartitionsRequest))
  466. }
  467. return interceptor(ctx, in, info, handler)
  468. }
  469. func _SeaweedMessaging_AssignTopicPartitions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  470. in := new(AssignTopicPartitionsRequest)
  471. if err := dec(in); err != nil {
  472. return nil, err
  473. }
  474. if interceptor == nil {
  475. return srv.(SeaweedMessagingServer).AssignTopicPartitions(ctx, in)
  476. }
  477. info := &grpc.UnaryServerInfo{
  478. Server: srv,
  479. FullMethod: "/messaging_pb.SeaweedMessaging/AssignTopicPartitions",
  480. }
  481. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  482. return srv.(SeaweedMessagingServer).AssignTopicPartitions(ctx, req.(*AssignTopicPartitionsRequest))
  483. }
  484. return interceptor(ctx, in, info, handler)
  485. }
  486. func _SeaweedMessaging_CheckTopicPartitionsStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  487. in := new(CheckTopicPartitionsStatusRequest)
  488. if err := dec(in); err != nil {
  489. return nil, err
  490. }
  491. if interceptor == nil {
  492. return srv.(SeaweedMessagingServer).CheckTopicPartitionsStatus(ctx, in)
  493. }
  494. info := &grpc.UnaryServerInfo{
  495. Server: srv,
  496. FullMethod: "/messaging_pb.SeaweedMessaging/CheckTopicPartitionsStatus",
  497. }
  498. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  499. return srv.(SeaweedMessagingServer).CheckTopicPartitionsStatus(ctx, req.(*CheckTopicPartitionsStatusRequest))
  500. }
  501. return interceptor(ctx, in, info, handler)
  502. }
  503. func _SeaweedMessaging_Publish_Handler(srv interface{}, stream grpc.ServerStream) error {
  504. return srv.(SeaweedMessagingServer).Publish(&seaweedMessagingPublishServer{stream})
  505. }
  506. type SeaweedMessaging_PublishServer interface {
  507. Send(*PublishResponse) error
  508. Recv() (*PublishRequest, error)
  509. grpc.ServerStream
  510. }
  511. type seaweedMessagingPublishServer struct {
  512. grpc.ServerStream
  513. }
  514. func (x *seaweedMessagingPublishServer) Send(m *PublishResponse) error {
  515. return x.ServerStream.SendMsg(m)
  516. }
  517. func (x *seaweedMessagingPublishServer) Recv() (*PublishRequest, error) {
  518. m := new(PublishRequest)
  519. if err := x.ServerStream.RecvMsg(m); err != nil {
  520. return nil, err
  521. }
  522. return m, nil
  523. }
  524. func _SeaweedMessaging_Subscribe_Handler(srv interface{}, stream grpc.ServerStream) error {
  525. m := new(SubscribeRequest)
  526. if err := stream.RecvMsg(m); err != nil {
  527. return err
  528. }
  529. return srv.(SeaweedMessagingServer).Subscribe(m, &seaweedMessagingSubscribeServer{stream})
  530. }
  531. type SeaweedMessaging_SubscribeServer interface {
  532. Send(*SubscribeResponse) error
  533. grpc.ServerStream
  534. }
  535. type seaweedMessagingSubscribeServer struct {
  536. grpc.ServerStream
  537. }
  538. func (x *seaweedMessagingSubscribeServer) Send(m *SubscribeResponse) error {
  539. return x.ServerStream.SendMsg(m)
  540. }
  541. // SeaweedMessaging_ServiceDesc is the grpc.ServiceDesc for SeaweedMessaging service.
  542. // It's only intended for direct use with grpc.RegisterService,
  543. // and not to be introspected or modified (even as a copy)
  544. var SeaweedMessaging_ServiceDesc = grpc.ServiceDesc{
  545. ServiceName: "messaging_pb.SeaweedMessaging",
  546. HandlerType: (*SeaweedMessagingServer)(nil),
  547. Methods: []grpc.MethodDesc{
  548. {
  549. MethodName: "FindBrokerLeader",
  550. Handler: _SeaweedMessaging_FindBrokerLeader_Handler,
  551. },
  552. {
  553. MethodName: "AssignSegmentBrokers",
  554. Handler: _SeaweedMessaging_AssignSegmentBrokers_Handler,
  555. },
  556. {
  557. MethodName: "CheckSegmentStatus",
  558. Handler: _SeaweedMessaging_CheckSegmentStatus_Handler,
  559. },
  560. {
  561. MethodName: "CheckBrokerLoad",
  562. Handler: _SeaweedMessaging_CheckBrokerLoad_Handler,
  563. },
  564. {
  565. MethodName: "LookupTopicBrokers",
  566. Handler: _SeaweedMessaging_LookupTopicBrokers_Handler,
  567. },
  568. {
  569. MethodName: "CreateTopic",
  570. Handler: _SeaweedMessaging_CreateTopic_Handler,
  571. },
  572. {
  573. MethodName: "DoCreateTopic",
  574. Handler: _SeaweedMessaging_DoCreateTopic_Handler,
  575. },
  576. {
  577. MethodName: "ListTopics",
  578. Handler: _SeaweedMessaging_ListTopics_Handler,
  579. },
  580. {
  581. MethodName: "RequestTopicPartitions",
  582. Handler: _SeaweedMessaging_RequestTopicPartitions_Handler,
  583. },
  584. {
  585. MethodName: "AssignTopicPartitions",
  586. Handler: _SeaweedMessaging_AssignTopicPartitions_Handler,
  587. },
  588. {
  589. MethodName: "CheckTopicPartitionsStatus",
  590. Handler: _SeaweedMessaging_CheckTopicPartitionsStatus_Handler,
  591. },
  592. },
  593. Streams: []grpc.StreamDesc{
  594. {
  595. StreamName: "ConnectToBalancer",
  596. Handler: _SeaweedMessaging_ConnectToBalancer_Handler,
  597. ServerStreams: true,
  598. ClientStreams: true,
  599. },
  600. {
  601. StreamName: "Publish",
  602. Handler: _SeaweedMessaging_Publish_Handler,
  603. ServerStreams: true,
  604. ClientStreams: true,
  605. },
  606. {
  607. StreamName: "Subscribe",
  608. Handler: _SeaweedMessaging_Subscribe_Handler,
  609. ServerStreams: true,
  610. },
  611. },
  612. Metadata: "mq.proto",
  613. }