mq_grpc.pb.go 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723
  1. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
  2. // versions:
  3. // - protoc-gen-go-grpc v1.3.0
  4. // - protoc v4.25.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. const (
  18. SeaweedMessaging_FindBrokerLeader_FullMethodName = "/messaging_pb.SeaweedMessaging/FindBrokerLeader"
  19. SeaweedMessaging_PublisherToPubBalancer_FullMethodName = "/messaging_pb.SeaweedMessaging/PublisherToPubBalancer"
  20. SeaweedMessaging_BalanceTopics_FullMethodName = "/messaging_pb.SeaweedMessaging/BalanceTopics"
  21. SeaweedMessaging_ListTopics_FullMethodName = "/messaging_pb.SeaweedMessaging/ListTopics"
  22. SeaweedMessaging_ConfigureTopic_FullMethodName = "/messaging_pb.SeaweedMessaging/ConfigureTopic"
  23. SeaweedMessaging_LookupTopicBrokers_FullMethodName = "/messaging_pb.SeaweedMessaging/LookupTopicBrokers"
  24. SeaweedMessaging_AssignTopicPartitions_FullMethodName = "/messaging_pb.SeaweedMessaging/AssignTopicPartitions"
  25. SeaweedMessaging_ClosePublishers_FullMethodName = "/messaging_pb.SeaweedMessaging/ClosePublishers"
  26. SeaweedMessaging_CloseSubscribers_FullMethodName = "/messaging_pb.SeaweedMessaging/CloseSubscribers"
  27. SeaweedMessaging_SubscriberToSubCoordinator_FullMethodName = "/messaging_pb.SeaweedMessaging/SubscriberToSubCoordinator"
  28. SeaweedMessaging_PublishMessage_FullMethodName = "/messaging_pb.SeaweedMessaging/PublishMessage"
  29. SeaweedMessaging_SubscribeMessage_FullMethodName = "/messaging_pb.SeaweedMessaging/SubscribeMessage"
  30. SeaweedMessaging_PublishFollowMe_FullMethodName = "/messaging_pb.SeaweedMessaging/PublishFollowMe"
  31. )
  32. // SeaweedMessagingClient is the client API for SeaweedMessaging service.
  33. //
  34. // 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.
  35. type SeaweedMessagingClient interface {
  36. // control plane
  37. FindBrokerLeader(ctx context.Context, in *FindBrokerLeaderRequest, opts ...grpc.CallOption) (*FindBrokerLeaderResponse, error)
  38. // control plane for balancer
  39. PublisherToPubBalancer(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_PublisherToPubBalancerClient, error)
  40. BalanceTopics(ctx context.Context, in *BalanceTopicsRequest, opts ...grpc.CallOption) (*BalanceTopicsResponse, error)
  41. // control plane for topic partitions
  42. ListTopics(ctx context.Context, in *ListTopicsRequest, opts ...grpc.CallOption) (*ListTopicsResponse, error)
  43. ConfigureTopic(ctx context.Context, in *ConfigureTopicRequest, opts ...grpc.CallOption) (*ConfigureTopicResponse, error)
  44. LookupTopicBrokers(ctx context.Context, in *LookupTopicBrokersRequest, opts ...grpc.CallOption) (*LookupTopicBrokersResponse, error)
  45. // invoked by the balancer, running on each broker
  46. AssignTopicPartitions(ctx context.Context, in *AssignTopicPartitionsRequest, opts ...grpc.CallOption) (*AssignTopicPartitionsResponse, error)
  47. ClosePublishers(ctx context.Context, in *ClosePublishersRequest, opts ...grpc.CallOption) (*ClosePublishersResponse, error)
  48. CloseSubscribers(ctx context.Context, in *CloseSubscribersRequest, opts ...grpc.CallOption) (*CloseSubscribersResponse, error)
  49. // subscriber connects to broker balancer, which coordinates with the subscribers
  50. SubscriberToSubCoordinator(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_SubscriberToSubCoordinatorClient, error)
  51. // data plane for each topic partition
  52. PublishMessage(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_PublishMessageClient, error)
  53. SubscribeMessage(ctx context.Context, in *SubscribeMessageRequest, opts ...grpc.CallOption) (SeaweedMessaging_SubscribeMessageClient, error)
  54. // The lead broker asks a follower broker to follow itself
  55. PublishFollowMe(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_PublishFollowMeClient, error)
  56. }
  57. type seaweedMessagingClient struct {
  58. cc grpc.ClientConnInterface
  59. }
  60. func NewSeaweedMessagingClient(cc grpc.ClientConnInterface) SeaweedMessagingClient {
  61. return &seaweedMessagingClient{cc}
  62. }
  63. func (c *seaweedMessagingClient) FindBrokerLeader(ctx context.Context, in *FindBrokerLeaderRequest, opts ...grpc.CallOption) (*FindBrokerLeaderResponse, error) {
  64. out := new(FindBrokerLeaderResponse)
  65. err := c.cc.Invoke(ctx, SeaweedMessaging_FindBrokerLeader_FullMethodName, in, out, opts...)
  66. if err != nil {
  67. return nil, err
  68. }
  69. return out, nil
  70. }
  71. func (c *seaweedMessagingClient) PublisherToPubBalancer(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_PublisherToPubBalancerClient, error) {
  72. stream, err := c.cc.NewStream(ctx, &SeaweedMessaging_ServiceDesc.Streams[0], SeaweedMessaging_PublisherToPubBalancer_FullMethodName, opts...)
  73. if err != nil {
  74. return nil, err
  75. }
  76. x := &seaweedMessagingPublisherToPubBalancerClient{stream}
  77. return x, nil
  78. }
  79. type SeaweedMessaging_PublisherToPubBalancerClient interface {
  80. Send(*PublisherToPubBalancerRequest) error
  81. Recv() (*PublisherToPubBalancerResponse, error)
  82. grpc.ClientStream
  83. }
  84. type seaweedMessagingPublisherToPubBalancerClient struct {
  85. grpc.ClientStream
  86. }
  87. func (x *seaweedMessagingPublisherToPubBalancerClient) Send(m *PublisherToPubBalancerRequest) error {
  88. return x.ClientStream.SendMsg(m)
  89. }
  90. func (x *seaweedMessagingPublisherToPubBalancerClient) Recv() (*PublisherToPubBalancerResponse, error) {
  91. m := new(PublisherToPubBalancerResponse)
  92. if err := x.ClientStream.RecvMsg(m); err != nil {
  93. return nil, err
  94. }
  95. return m, nil
  96. }
  97. func (c *seaweedMessagingClient) BalanceTopics(ctx context.Context, in *BalanceTopicsRequest, opts ...grpc.CallOption) (*BalanceTopicsResponse, error) {
  98. out := new(BalanceTopicsResponse)
  99. err := c.cc.Invoke(ctx, SeaweedMessaging_BalanceTopics_FullMethodName, in, out, opts...)
  100. if err != nil {
  101. return nil, err
  102. }
  103. return out, nil
  104. }
  105. func (c *seaweedMessagingClient) ListTopics(ctx context.Context, in *ListTopicsRequest, opts ...grpc.CallOption) (*ListTopicsResponse, error) {
  106. out := new(ListTopicsResponse)
  107. err := c.cc.Invoke(ctx, SeaweedMessaging_ListTopics_FullMethodName, in, out, opts...)
  108. if err != nil {
  109. return nil, err
  110. }
  111. return out, nil
  112. }
  113. func (c *seaweedMessagingClient) ConfigureTopic(ctx context.Context, in *ConfigureTopicRequest, opts ...grpc.CallOption) (*ConfigureTopicResponse, error) {
  114. out := new(ConfigureTopicResponse)
  115. err := c.cc.Invoke(ctx, SeaweedMessaging_ConfigureTopic_FullMethodName, in, out, opts...)
  116. if err != nil {
  117. return nil, err
  118. }
  119. return out, nil
  120. }
  121. func (c *seaweedMessagingClient) LookupTopicBrokers(ctx context.Context, in *LookupTopicBrokersRequest, opts ...grpc.CallOption) (*LookupTopicBrokersResponse, error) {
  122. out := new(LookupTopicBrokersResponse)
  123. err := c.cc.Invoke(ctx, SeaweedMessaging_LookupTopicBrokers_FullMethodName, in, out, opts...)
  124. if err != nil {
  125. return nil, err
  126. }
  127. return out, nil
  128. }
  129. func (c *seaweedMessagingClient) AssignTopicPartitions(ctx context.Context, in *AssignTopicPartitionsRequest, opts ...grpc.CallOption) (*AssignTopicPartitionsResponse, error) {
  130. out := new(AssignTopicPartitionsResponse)
  131. err := c.cc.Invoke(ctx, SeaweedMessaging_AssignTopicPartitions_FullMethodName, in, out, opts...)
  132. if err != nil {
  133. return nil, err
  134. }
  135. return out, nil
  136. }
  137. func (c *seaweedMessagingClient) ClosePublishers(ctx context.Context, in *ClosePublishersRequest, opts ...grpc.CallOption) (*ClosePublishersResponse, error) {
  138. out := new(ClosePublishersResponse)
  139. err := c.cc.Invoke(ctx, SeaweedMessaging_ClosePublishers_FullMethodName, in, out, opts...)
  140. if err != nil {
  141. return nil, err
  142. }
  143. return out, nil
  144. }
  145. func (c *seaweedMessagingClient) CloseSubscribers(ctx context.Context, in *CloseSubscribersRequest, opts ...grpc.CallOption) (*CloseSubscribersResponse, error) {
  146. out := new(CloseSubscribersResponse)
  147. err := c.cc.Invoke(ctx, SeaweedMessaging_CloseSubscribers_FullMethodName, in, out, opts...)
  148. if err != nil {
  149. return nil, err
  150. }
  151. return out, nil
  152. }
  153. func (c *seaweedMessagingClient) SubscriberToSubCoordinator(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_SubscriberToSubCoordinatorClient, error) {
  154. stream, err := c.cc.NewStream(ctx, &SeaweedMessaging_ServiceDesc.Streams[1], SeaweedMessaging_SubscriberToSubCoordinator_FullMethodName, opts...)
  155. if err != nil {
  156. return nil, err
  157. }
  158. x := &seaweedMessagingSubscriberToSubCoordinatorClient{stream}
  159. return x, nil
  160. }
  161. type SeaweedMessaging_SubscriberToSubCoordinatorClient interface {
  162. Send(*SubscriberToSubCoordinatorRequest) error
  163. Recv() (*SubscriberToSubCoordinatorResponse, error)
  164. grpc.ClientStream
  165. }
  166. type seaweedMessagingSubscriberToSubCoordinatorClient struct {
  167. grpc.ClientStream
  168. }
  169. func (x *seaweedMessagingSubscriberToSubCoordinatorClient) Send(m *SubscriberToSubCoordinatorRequest) error {
  170. return x.ClientStream.SendMsg(m)
  171. }
  172. func (x *seaweedMessagingSubscriberToSubCoordinatorClient) Recv() (*SubscriberToSubCoordinatorResponse, error) {
  173. m := new(SubscriberToSubCoordinatorResponse)
  174. if err := x.ClientStream.RecvMsg(m); err != nil {
  175. return nil, err
  176. }
  177. return m, nil
  178. }
  179. func (c *seaweedMessagingClient) PublishMessage(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_PublishMessageClient, error) {
  180. stream, err := c.cc.NewStream(ctx, &SeaweedMessaging_ServiceDesc.Streams[2], SeaweedMessaging_PublishMessage_FullMethodName, opts...)
  181. if err != nil {
  182. return nil, err
  183. }
  184. x := &seaweedMessagingPublishMessageClient{stream}
  185. return x, nil
  186. }
  187. type SeaweedMessaging_PublishMessageClient interface {
  188. Send(*PublishMessageRequest) error
  189. Recv() (*PublishMessageResponse, error)
  190. grpc.ClientStream
  191. }
  192. type seaweedMessagingPublishMessageClient struct {
  193. grpc.ClientStream
  194. }
  195. func (x *seaweedMessagingPublishMessageClient) Send(m *PublishMessageRequest) error {
  196. return x.ClientStream.SendMsg(m)
  197. }
  198. func (x *seaweedMessagingPublishMessageClient) Recv() (*PublishMessageResponse, error) {
  199. m := new(PublishMessageResponse)
  200. if err := x.ClientStream.RecvMsg(m); err != nil {
  201. return nil, err
  202. }
  203. return m, nil
  204. }
  205. func (c *seaweedMessagingClient) SubscribeMessage(ctx context.Context, in *SubscribeMessageRequest, opts ...grpc.CallOption) (SeaweedMessaging_SubscribeMessageClient, error) {
  206. stream, err := c.cc.NewStream(ctx, &SeaweedMessaging_ServiceDesc.Streams[3], SeaweedMessaging_SubscribeMessage_FullMethodName, opts...)
  207. if err != nil {
  208. return nil, err
  209. }
  210. x := &seaweedMessagingSubscribeMessageClient{stream}
  211. if err := x.ClientStream.SendMsg(in); err != nil {
  212. return nil, err
  213. }
  214. if err := x.ClientStream.CloseSend(); err != nil {
  215. return nil, err
  216. }
  217. return x, nil
  218. }
  219. type SeaweedMessaging_SubscribeMessageClient interface {
  220. Recv() (*SubscribeMessageResponse, error)
  221. grpc.ClientStream
  222. }
  223. type seaweedMessagingSubscribeMessageClient struct {
  224. grpc.ClientStream
  225. }
  226. func (x *seaweedMessagingSubscribeMessageClient) Recv() (*SubscribeMessageResponse, error) {
  227. m := new(SubscribeMessageResponse)
  228. if err := x.ClientStream.RecvMsg(m); err != nil {
  229. return nil, err
  230. }
  231. return m, nil
  232. }
  233. func (c *seaweedMessagingClient) PublishFollowMe(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_PublishFollowMeClient, error) {
  234. stream, err := c.cc.NewStream(ctx, &SeaweedMessaging_ServiceDesc.Streams[4], SeaweedMessaging_PublishFollowMe_FullMethodName, opts...)
  235. if err != nil {
  236. return nil, err
  237. }
  238. x := &seaweedMessagingPublishFollowMeClient{stream}
  239. return x, nil
  240. }
  241. type SeaweedMessaging_PublishFollowMeClient interface {
  242. Send(*PublishFollowMeRequest) error
  243. Recv() (*PublishFollowMeResponse, error)
  244. grpc.ClientStream
  245. }
  246. type seaweedMessagingPublishFollowMeClient struct {
  247. grpc.ClientStream
  248. }
  249. func (x *seaweedMessagingPublishFollowMeClient) Send(m *PublishFollowMeRequest) error {
  250. return x.ClientStream.SendMsg(m)
  251. }
  252. func (x *seaweedMessagingPublishFollowMeClient) Recv() (*PublishFollowMeResponse, error) {
  253. m := new(PublishFollowMeResponse)
  254. if err := x.ClientStream.RecvMsg(m); err != nil {
  255. return nil, err
  256. }
  257. return m, nil
  258. }
  259. // SeaweedMessagingServer is the server API for SeaweedMessaging service.
  260. // All implementations must embed UnimplementedSeaweedMessagingServer
  261. // for forward compatibility
  262. type SeaweedMessagingServer interface {
  263. // control plane
  264. FindBrokerLeader(context.Context, *FindBrokerLeaderRequest) (*FindBrokerLeaderResponse, error)
  265. // control plane for balancer
  266. PublisherToPubBalancer(SeaweedMessaging_PublisherToPubBalancerServer) error
  267. BalanceTopics(context.Context, *BalanceTopicsRequest) (*BalanceTopicsResponse, error)
  268. // control plane for topic partitions
  269. ListTopics(context.Context, *ListTopicsRequest) (*ListTopicsResponse, error)
  270. ConfigureTopic(context.Context, *ConfigureTopicRequest) (*ConfigureTopicResponse, error)
  271. LookupTopicBrokers(context.Context, *LookupTopicBrokersRequest) (*LookupTopicBrokersResponse, error)
  272. // invoked by the balancer, running on each broker
  273. AssignTopicPartitions(context.Context, *AssignTopicPartitionsRequest) (*AssignTopicPartitionsResponse, error)
  274. ClosePublishers(context.Context, *ClosePublishersRequest) (*ClosePublishersResponse, error)
  275. CloseSubscribers(context.Context, *CloseSubscribersRequest) (*CloseSubscribersResponse, error)
  276. // subscriber connects to broker balancer, which coordinates with the subscribers
  277. SubscriberToSubCoordinator(SeaweedMessaging_SubscriberToSubCoordinatorServer) error
  278. // data plane for each topic partition
  279. PublishMessage(SeaweedMessaging_PublishMessageServer) error
  280. SubscribeMessage(*SubscribeMessageRequest, SeaweedMessaging_SubscribeMessageServer) error
  281. // The lead broker asks a follower broker to follow itself
  282. PublishFollowMe(SeaweedMessaging_PublishFollowMeServer) error
  283. mustEmbedUnimplementedSeaweedMessagingServer()
  284. }
  285. // UnimplementedSeaweedMessagingServer must be embedded to have forward compatible implementations.
  286. type UnimplementedSeaweedMessagingServer struct {
  287. }
  288. func (UnimplementedSeaweedMessagingServer) FindBrokerLeader(context.Context, *FindBrokerLeaderRequest) (*FindBrokerLeaderResponse, error) {
  289. return nil, status.Errorf(codes.Unimplemented, "method FindBrokerLeader not implemented")
  290. }
  291. func (UnimplementedSeaweedMessagingServer) PublisherToPubBalancer(SeaweedMessaging_PublisherToPubBalancerServer) error {
  292. return status.Errorf(codes.Unimplemented, "method PublisherToPubBalancer not implemented")
  293. }
  294. func (UnimplementedSeaweedMessagingServer) BalanceTopics(context.Context, *BalanceTopicsRequest) (*BalanceTopicsResponse, error) {
  295. return nil, status.Errorf(codes.Unimplemented, "method BalanceTopics not implemented")
  296. }
  297. func (UnimplementedSeaweedMessagingServer) ListTopics(context.Context, *ListTopicsRequest) (*ListTopicsResponse, error) {
  298. return nil, status.Errorf(codes.Unimplemented, "method ListTopics not implemented")
  299. }
  300. func (UnimplementedSeaweedMessagingServer) ConfigureTopic(context.Context, *ConfigureTopicRequest) (*ConfigureTopicResponse, error) {
  301. return nil, status.Errorf(codes.Unimplemented, "method ConfigureTopic not implemented")
  302. }
  303. func (UnimplementedSeaweedMessagingServer) LookupTopicBrokers(context.Context, *LookupTopicBrokersRequest) (*LookupTopicBrokersResponse, error) {
  304. return nil, status.Errorf(codes.Unimplemented, "method LookupTopicBrokers not implemented")
  305. }
  306. func (UnimplementedSeaweedMessagingServer) AssignTopicPartitions(context.Context, *AssignTopicPartitionsRequest) (*AssignTopicPartitionsResponse, error) {
  307. return nil, status.Errorf(codes.Unimplemented, "method AssignTopicPartitions not implemented")
  308. }
  309. func (UnimplementedSeaweedMessagingServer) ClosePublishers(context.Context, *ClosePublishersRequest) (*ClosePublishersResponse, error) {
  310. return nil, status.Errorf(codes.Unimplemented, "method ClosePublishers not implemented")
  311. }
  312. func (UnimplementedSeaweedMessagingServer) CloseSubscribers(context.Context, *CloseSubscribersRequest) (*CloseSubscribersResponse, error) {
  313. return nil, status.Errorf(codes.Unimplemented, "method CloseSubscribers not implemented")
  314. }
  315. func (UnimplementedSeaweedMessagingServer) SubscriberToSubCoordinator(SeaweedMessaging_SubscriberToSubCoordinatorServer) error {
  316. return status.Errorf(codes.Unimplemented, "method SubscriberToSubCoordinator not implemented")
  317. }
  318. func (UnimplementedSeaweedMessagingServer) PublishMessage(SeaweedMessaging_PublishMessageServer) error {
  319. return status.Errorf(codes.Unimplemented, "method PublishMessage not implemented")
  320. }
  321. func (UnimplementedSeaweedMessagingServer) SubscribeMessage(*SubscribeMessageRequest, SeaweedMessaging_SubscribeMessageServer) error {
  322. return status.Errorf(codes.Unimplemented, "method SubscribeMessage not implemented")
  323. }
  324. func (UnimplementedSeaweedMessagingServer) PublishFollowMe(SeaweedMessaging_PublishFollowMeServer) error {
  325. return status.Errorf(codes.Unimplemented, "method PublishFollowMe not implemented")
  326. }
  327. func (UnimplementedSeaweedMessagingServer) mustEmbedUnimplementedSeaweedMessagingServer() {}
  328. // UnsafeSeaweedMessagingServer may be embedded to opt out of forward compatibility for this service.
  329. // Use of this interface is not recommended, as added methods to SeaweedMessagingServer will
  330. // result in compilation errors.
  331. type UnsafeSeaweedMessagingServer interface {
  332. mustEmbedUnimplementedSeaweedMessagingServer()
  333. }
  334. func RegisterSeaweedMessagingServer(s grpc.ServiceRegistrar, srv SeaweedMessagingServer) {
  335. s.RegisterService(&SeaweedMessaging_ServiceDesc, srv)
  336. }
  337. func _SeaweedMessaging_FindBrokerLeader_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  338. in := new(FindBrokerLeaderRequest)
  339. if err := dec(in); err != nil {
  340. return nil, err
  341. }
  342. if interceptor == nil {
  343. return srv.(SeaweedMessagingServer).FindBrokerLeader(ctx, in)
  344. }
  345. info := &grpc.UnaryServerInfo{
  346. Server: srv,
  347. FullMethod: SeaweedMessaging_FindBrokerLeader_FullMethodName,
  348. }
  349. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  350. return srv.(SeaweedMessagingServer).FindBrokerLeader(ctx, req.(*FindBrokerLeaderRequest))
  351. }
  352. return interceptor(ctx, in, info, handler)
  353. }
  354. func _SeaweedMessaging_PublisherToPubBalancer_Handler(srv interface{}, stream grpc.ServerStream) error {
  355. return srv.(SeaweedMessagingServer).PublisherToPubBalancer(&seaweedMessagingPublisherToPubBalancerServer{stream})
  356. }
  357. type SeaweedMessaging_PublisherToPubBalancerServer interface {
  358. Send(*PublisherToPubBalancerResponse) error
  359. Recv() (*PublisherToPubBalancerRequest, error)
  360. grpc.ServerStream
  361. }
  362. type seaweedMessagingPublisherToPubBalancerServer struct {
  363. grpc.ServerStream
  364. }
  365. func (x *seaweedMessagingPublisherToPubBalancerServer) Send(m *PublisherToPubBalancerResponse) error {
  366. return x.ServerStream.SendMsg(m)
  367. }
  368. func (x *seaweedMessagingPublisherToPubBalancerServer) Recv() (*PublisherToPubBalancerRequest, error) {
  369. m := new(PublisherToPubBalancerRequest)
  370. if err := x.ServerStream.RecvMsg(m); err != nil {
  371. return nil, err
  372. }
  373. return m, nil
  374. }
  375. func _SeaweedMessaging_BalanceTopics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  376. in := new(BalanceTopicsRequest)
  377. if err := dec(in); err != nil {
  378. return nil, err
  379. }
  380. if interceptor == nil {
  381. return srv.(SeaweedMessagingServer).BalanceTopics(ctx, in)
  382. }
  383. info := &grpc.UnaryServerInfo{
  384. Server: srv,
  385. FullMethod: SeaweedMessaging_BalanceTopics_FullMethodName,
  386. }
  387. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  388. return srv.(SeaweedMessagingServer).BalanceTopics(ctx, req.(*BalanceTopicsRequest))
  389. }
  390. return interceptor(ctx, in, info, handler)
  391. }
  392. func _SeaweedMessaging_ListTopics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  393. in := new(ListTopicsRequest)
  394. if err := dec(in); err != nil {
  395. return nil, err
  396. }
  397. if interceptor == nil {
  398. return srv.(SeaweedMessagingServer).ListTopics(ctx, in)
  399. }
  400. info := &grpc.UnaryServerInfo{
  401. Server: srv,
  402. FullMethod: SeaweedMessaging_ListTopics_FullMethodName,
  403. }
  404. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  405. return srv.(SeaweedMessagingServer).ListTopics(ctx, req.(*ListTopicsRequest))
  406. }
  407. return interceptor(ctx, in, info, handler)
  408. }
  409. func _SeaweedMessaging_ConfigureTopic_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  410. in := new(ConfigureTopicRequest)
  411. if err := dec(in); err != nil {
  412. return nil, err
  413. }
  414. if interceptor == nil {
  415. return srv.(SeaweedMessagingServer).ConfigureTopic(ctx, in)
  416. }
  417. info := &grpc.UnaryServerInfo{
  418. Server: srv,
  419. FullMethod: SeaweedMessaging_ConfigureTopic_FullMethodName,
  420. }
  421. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  422. return srv.(SeaweedMessagingServer).ConfigureTopic(ctx, req.(*ConfigureTopicRequest))
  423. }
  424. return interceptor(ctx, in, info, handler)
  425. }
  426. func _SeaweedMessaging_LookupTopicBrokers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  427. in := new(LookupTopicBrokersRequest)
  428. if err := dec(in); err != nil {
  429. return nil, err
  430. }
  431. if interceptor == nil {
  432. return srv.(SeaweedMessagingServer).LookupTopicBrokers(ctx, in)
  433. }
  434. info := &grpc.UnaryServerInfo{
  435. Server: srv,
  436. FullMethod: SeaweedMessaging_LookupTopicBrokers_FullMethodName,
  437. }
  438. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  439. return srv.(SeaweedMessagingServer).LookupTopicBrokers(ctx, req.(*LookupTopicBrokersRequest))
  440. }
  441. return interceptor(ctx, in, info, handler)
  442. }
  443. func _SeaweedMessaging_AssignTopicPartitions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  444. in := new(AssignTopicPartitionsRequest)
  445. if err := dec(in); err != nil {
  446. return nil, err
  447. }
  448. if interceptor == nil {
  449. return srv.(SeaweedMessagingServer).AssignTopicPartitions(ctx, in)
  450. }
  451. info := &grpc.UnaryServerInfo{
  452. Server: srv,
  453. FullMethod: SeaweedMessaging_AssignTopicPartitions_FullMethodName,
  454. }
  455. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  456. return srv.(SeaweedMessagingServer).AssignTopicPartitions(ctx, req.(*AssignTopicPartitionsRequest))
  457. }
  458. return interceptor(ctx, in, info, handler)
  459. }
  460. func _SeaweedMessaging_ClosePublishers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  461. in := new(ClosePublishersRequest)
  462. if err := dec(in); err != nil {
  463. return nil, err
  464. }
  465. if interceptor == nil {
  466. return srv.(SeaweedMessagingServer).ClosePublishers(ctx, in)
  467. }
  468. info := &grpc.UnaryServerInfo{
  469. Server: srv,
  470. FullMethod: SeaweedMessaging_ClosePublishers_FullMethodName,
  471. }
  472. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  473. return srv.(SeaweedMessagingServer).ClosePublishers(ctx, req.(*ClosePublishersRequest))
  474. }
  475. return interceptor(ctx, in, info, handler)
  476. }
  477. func _SeaweedMessaging_CloseSubscribers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  478. in := new(CloseSubscribersRequest)
  479. if err := dec(in); err != nil {
  480. return nil, err
  481. }
  482. if interceptor == nil {
  483. return srv.(SeaweedMessagingServer).CloseSubscribers(ctx, in)
  484. }
  485. info := &grpc.UnaryServerInfo{
  486. Server: srv,
  487. FullMethod: SeaweedMessaging_CloseSubscribers_FullMethodName,
  488. }
  489. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  490. return srv.(SeaweedMessagingServer).CloseSubscribers(ctx, req.(*CloseSubscribersRequest))
  491. }
  492. return interceptor(ctx, in, info, handler)
  493. }
  494. func _SeaweedMessaging_SubscriberToSubCoordinator_Handler(srv interface{}, stream grpc.ServerStream) error {
  495. return srv.(SeaweedMessagingServer).SubscriberToSubCoordinator(&seaweedMessagingSubscriberToSubCoordinatorServer{stream})
  496. }
  497. type SeaweedMessaging_SubscriberToSubCoordinatorServer interface {
  498. Send(*SubscriberToSubCoordinatorResponse) error
  499. Recv() (*SubscriberToSubCoordinatorRequest, error)
  500. grpc.ServerStream
  501. }
  502. type seaweedMessagingSubscriberToSubCoordinatorServer struct {
  503. grpc.ServerStream
  504. }
  505. func (x *seaweedMessagingSubscriberToSubCoordinatorServer) Send(m *SubscriberToSubCoordinatorResponse) error {
  506. return x.ServerStream.SendMsg(m)
  507. }
  508. func (x *seaweedMessagingSubscriberToSubCoordinatorServer) Recv() (*SubscriberToSubCoordinatorRequest, error) {
  509. m := new(SubscriberToSubCoordinatorRequest)
  510. if err := x.ServerStream.RecvMsg(m); err != nil {
  511. return nil, err
  512. }
  513. return m, nil
  514. }
  515. func _SeaweedMessaging_PublishMessage_Handler(srv interface{}, stream grpc.ServerStream) error {
  516. return srv.(SeaweedMessagingServer).PublishMessage(&seaweedMessagingPublishMessageServer{stream})
  517. }
  518. type SeaweedMessaging_PublishMessageServer interface {
  519. Send(*PublishMessageResponse) error
  520. Recv() (*PublishMessageRequest, error)
  521. grpc.ServerStream
  522. }
  523. type seaweedMessagingPublishMessageServer struct {
  524. grpc.ServerStream
  525. }
  526. func (x *seaweedMessagingPublishMessageServer) Send(m *PublishMessageResponse) error {
  527. return x.ServerStream.SendMsg(m)
  528. }
  529. func (x *seaweedMessagingPublishMessageServer) Recv() (*PublishMessageRequest, error) {
  530. m := new(PublishMessageRequest)
  531. if err := x.ServerStream.RecvMsg(m); err != nil {
  532. return nil, err
  533. }
  534. return m, nil
  535. }
  536. func _SeaweedMessaging_SubscribeMessage_Handler(srv interface{}, stream grpc.ServerStream) error {
  537. m := new(SubscribeMessageRequest)
  538. if err := stream.RecvMsg(m); err != nil {
  539. return err
  540. }
  541. return srv.(SeaweedMessagingServer).SubscribeMessage(m, &seaweedMessagingSubscribeMessageServer{stream})
  542. }
  543. type SeaweedMessaging_SubscribeMessageServer interface {
  544. Send(*SubscribeMessageResponse) error
  545. grpc.ServerStream
  546. }
  547. type seaweedMessagingSubscribeMessageServer struct {
  548. grpc.ServerStream
  549. }
  550. func (x *seaweedMessagingSubscribeMessageServer) Send(m *SubscribeMessageResponse) error {
  551. return x.ServerStream.SendMsg(m)
  552. }
  553. func _SeaweedMessaging_PublishFollowMe_Handler(srv interface{}, stream grpc.ServerStream) error {
  554. return srv.(SeaweedMessagingServer).PublishFollowMe(&seaweedMessagingPublishFollowMeServer{stream})
  555. }
  556. type SeaweedMessaging_PublishFollowMeServer interface {
  557. Send(*PublishFollowMeResponse) error
  558. Recv() (*PublishFollowMeRequest, error)
  559. grpc.ServerStream
  560. }
  561. type seaweedMessagingPublishFollowMeServer struct {
  562. grpc.ServerStream
  563. }
  564. func (x *seaweedMessagingPublishFollowMeServer) Send(m *PublishFollowMeResponse) error {
  565. return x.ServerStream.SendMsg(m)
  566. }
  567. func (x *seaweedMessagingPublishFollowMeServer) Recv() (*PublishFollowMeRequest, error) {
  568. m := new(PublishFollowMeRequest)
  569. if err := x.ServerStream.RecvMsg(m); err != nil {
  570. return nil, err
  571. }
  572. return m, nil
  573. }
  574. // SeaweedMessaging_ServiceDesc is the grpc.ServiceDesc for SeaweedMessaging service.
  575. // It's only intended for direct use with grpc.RegisterService,
  576. // and not to be introspected or modified (even as a copy)
  577. var SeaweedMessaging_ServiceDesc = grpc.ServiceDesc{
  578. ServiceName: "messaging_pb.SeaweedMessaging",
  579. HandlerType: (*SeaweedMessagingServer)(nil),
  580. Methods: []grpc.MethodDesc{
  581. {
  582. MethodName: "FindBrokerLeader",
  583. Handler: _SeaweedMessaging_FindBrokerLeader_Handler,
  584. },
  585. {
  586. MethodName: "BalanceTopics",
  587. Handler: _SeaweedMessaging_BalanceTopics_Handler,
  588. },
  589. {
  590. MethodName: "ListTopics",
  591. Handler: _SeaweedMessaging_ListTopics_Handler,
  592. },
  593. {
  594. MethodName: "ConfigureTopic",
  595. Handler: _SeaweedMessaging_ConfigureTopic_Handler,
  596. },
  597. {
  598. MethodName: "LookupTopicBrokers",
  599. Handler: _SeaweedMessaging_LookupTopicBrokers_Handler,
  600. },
  601. {
  602. MethodName: "AssignTopicPartitions",
  603. Handler: _SeaweedMessaging_AssignTopicPartitions_Handler,
  604. },
  605. {
  606. MethodName: "ClosePublishers",
  607. Handler: _SeaweedMessaging_ClosePublishers_Handler,
  608. },
  609. {
  610. MethodName: "CloseSubscribers",
  611. Handler: _SeaweedMessaging_CloseSubscribers_Handler,
  612. },
  613. },
  614. Streams: []grpc.StreamDesc{
  615. {
  616. StreamName: "PublisherToPubBalancer",
  617. Handler: _SeaweedMessaging_PublisherToPubBalancer_Handler,
  618. ServerStreams: true,
  619. ClientStreams: true,
  620. },
  621. {
  622. StreamName: "SubscriberToSubCoordinator",
  623. Handler: _SeaweedMessaging_SubscriberToSubCoordinator_Handler,
  624. ServerStreams: true,
  625. ClientStreams: true,
  626. },
  627. {
  628. StreamName: "PublishMessage",
  629. Handler: _SeaweedMessaging_PublishMessage_Handler,
  630. ServerStreams: true,
  631. ClientStreams: true,
  632. },
  633. {
  634. StreamName: "SubscribeMessage",
  635. Handler: _SeaweedMessaging_SubscribeMessage_Handler,
  636. ServerStreams: true,
  637. },
  638. {
  639. StreamName: "PublishFollowMe",
  640. Handler: _SeaweedMessaging_PublishFollowMe_Handler,
  641. ServerStreams: true,
  642. ClientStreams: true,
  643. },
  644. },
  645. Metadata: "mq.proto",
  646. }