123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723 |
- // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
- // versions:
- // - protoc-gen-go-grpc v1.3.0
- // - protoc v4.25.3
- // source: mq.proto
- package mq_pb
- import (
- context "context"
- grpc "google.golang.org/grpc"
- codes "google.golang.org/grpc/codes"
- status "google.golang.org/grpc/status"
- )
- // This is a compile-time assertion to ensure that this generated file
- // is compatible with the grpc package it is being compiled against.
- // Requires gRPC-Go v1.32.0 or later.
- const _ = grpc.SupportPackageIsVersion7
- const (
- SeaweedMessaging_FindBrokerLeader_FullMethodName = "/messaging_pb.SeaweedMessaging/FindBrokerLeader"
- SeaweedMessaging_PublisherToPubBalancer_FullMethodName = "/messaging_pb.SeaweedMessaging/PublisherToPubBalancer"
- SeaweedMessaging_BalanceTopics_FullMethodName = "/messaging_pb.SeaweedMessaging/BalanceTopics"
- SeaweedMessaging_ListTopics_FullMethodName = "/messaging_pb.SeaweedMessaging/ListTopics"
- SeaweedMessaging_ConfigureTopic_FullMethodName = "/messaging_pb.SeaweedMessaging/ConfigureTopic"
- SeaweedMessaging_LookupTopicBrokers_FullMethodName = "/messaging_pb.SeaweedMessaging/LookupTopicBrokers"
- SeaweedMessaging_AssignTopicPartitions_FullMethodName = "/messaging_pb.SeaweedMessaging/AssignTopicPartitions"
- SeaweedMessaging_ClosePublishers_FullMethodName = "/messaging_pb.SeaweedMessaging/ClosePublishers"
- SeaweedMessaging_CloseSubscribers_FullMethodName = "/messaging_pb.SeaweedMessaging/CloseSubscribers"
- SeaweedMessaging_SubscriberToSubCoordinator_FullMethodName = "/messaging_pb.SeaweedMessaging/SubscriberToSubCoordinator"
- SeaweedMessaging_PublishMessage_FullMethodName = "/messaging_pb.SeaweedMessaging/PublishMessage"
- SeaweedMessaging_SubscribeMessage_FullMethodName = "/messaging_pb.SeaweedMessaging/SubscribeMessage"
- SeaweedMessaging_PublishFollowMe_FullMethodName = "/messaging_pb.SeaweedMessaging/PublishFollowMe"
- )
- // SeaweedMessagingClient is the client API for SeaweedMessaging service.
- //
- // 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.
- type SeaweedMessagingClient interface {
- // control plane
- FindBrokerLeader(ctx context.Context, in *FindBrokerLeaderRequest, opts ...grpc.CallOption) (*FindBrokerLeaderResponse, error)
- // control plane for balancer
- PublisherToPubBalancer(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_PublisherToPubBalancerClient, error)
- BalanceTopics(ctx context.Context, in *BalanceTopicsRequest, opts ...grpc.CallOption) (*BalanceTopicsResponse, error)
- // control plane for topic partitions
- ListTopics(ctx context.Context, in *ListTopicsRequest, opts ...grpc.CallOption) (*ListTopicsResponse, error)
- ConfigureTopic(ctx context.Context, in *ConfigureTopicRequest, opts ...grpc.CallOption) (*ConfigureTopicResponse, error)
- LookupTopicBrokers(ctx context.Context, in *LookupTopicBrokersRequest, opts ...grpc.CallOption) (*LookupTopicBrokersResponse, error)
- // invoked by the balancer, running on each broker
- AssignTopicPartitions(ctx context.Context, in *AssignTopicPartitionsRequest, opts ...grpc.CallOption) (*AssignTopicPartitionsResponse, error)
- ClosePublishers(ctx context.Context, in *ClosePublishersRequest, opts ...grpc.CallOption) (*ClosePublishersResponse, error)
- CloseSubscribers(ctx context.Context, in *CloseSubscribersRequest, opts ...grpc.CallOption) (*CloseSubscribersResponse, error)
- // subscriber connects to broker balancer, which coordinates with the subscribers
- SubscriberToSubCoordinator(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_SubscriberToSubCoordinatorClient, error)
- // data plane for each topic partition
- PublishMessage(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_PublishMessageClient, error)
- SubscribeMessage(ctx context.Context, in *SubscribeMessageRequest, opts ...grpc.CallOption) (SeaweedMessaging_SubscribeMessageClient, error)
- // The lead broker asks a follower broker to follow itself
- PublishFollowMe(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_PublishFollowMeClient, error)
- }
- type seaweedMessagingClient struct {
- cc grpc.ClientConnInterface
- }
- func NewSeaweedMessagingClient(cc grpc.ClientConnInterface) SeaweedMessagingClient {
- return &seaweedMessagingClient{cc}
- }
- func (c *seaweedMessagingClient) FindBrokerLeader(ctx context.Context, in *FindBrokerLeaderRequest, opts ...grpc.CallOption) (*FindBrokerLeaderResponse, error) {
- out := new(FindBrokerLeaderResponse)
- err := c.cc.Invoke(ctx, SeaweedMessaging_FindBrokerLeader_FullMethodName, in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *seaweedMessagingClient) PublisherToPubBalancer(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_PublisherToPubBalancerClient, error) {
- stream, err := c.cc.NewStream(ctx, &SeaweedMessaging_ServiceDesc.Streams[0], SeaweedMessaging_PublisherToPubBalancer_FullMethodName, opts...)
- if err != nil {
- return nil, err
- }
- x := &seaweedMessagingPublisherToPubBalancerClient{stream}
- return x, nil
- }
- type SeaweedMessaging_PublisherToPubBalancerClient interface {
- Send(*PublisherToPubBalancerRequest) error
- Recv() (*PublisherToPubBalancerResponse, error)
- grpc.ClientStream
- }
- type seaweedMessagingPublisherToPubBalancerClient struct {
- grpc.ClientStream
- }
- func (x *seaweedMessagingPublisherToPubBalancerClient) Send(m *PublisherToPubBalancerRequest) error {
- return x.ClientStream.SendMsg(m)
- }
- func (x *seaweedMessagingPublisherToPubBalancerClient) Recv() (*PublisherToPubBalancerResponse, error) {
- m := new(PublisherToPubBalancerResponse)
- if err := x.ClientStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
- }
- func (c *seaweedMessagingClient) BalanceTopics(ctx context.Context, in *BalanceTopicsRequest, opts ...grpc.CallOption) (*BalanceTopicsResponse, error) {
- out := new(BalanceTopicsResponse)
- err := c.cc.Invoke(ctx, SeaweedMessaging_BalanceTopics_FullMethodName, in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *seaweedMessagingClient) ListTopics(ctx context.Context, in *ListTopicsRequest, opts ...grpc.CallOption) (*ListTopicsResponse, error) {
- out := new(ListTopicsResponse)
- err := c.cc.Invoke(ctx, SeaweedMessaging_ListTopics_FullMethodName, in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *seaweedMessagingClient) ConfigureTopic(ctx context.Context, in *ConfigureTopicRequest, opts ...grpc.CallOption) (*ConfigureTopicResponse, error) {
- out := new(ConfigureTopicResponse)
- err := c.cc.Invoke(ctx, SeaweedMessaging_ConfigureTopic_FullMethodName, in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *seaweedMessagingClient) LookupTopicBrokers(ctx context.Context, in *LookupTopicBrokersRequest, opts ...grpc.CallOption) (*LookupTopicBrokersResponse, error) {
- out := new(LookupTopicBrokersResponse)
- err := c.cc.Invoke(ctx, SeaweedMessaging_LookupTopicBrokers_FullMethodName, in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *seaweedMessagingClient) AssignTopicPartitions(ctx context.Context, in *AssignTopicPartitionsRequest, opts ...grpc.CallOption) (*AssignTopicPartitionsResponse, error) {
- out := new(AssignTopicPartitionsResponse)
- err := c.cc.Invoke(ctx, SeaweedMessaging_AssignTopicPartitions_FullMethodName, in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *seaweedMessagingClient) ClosePublishers(ctx context.Context, in *ClosePublishersRequest, opts ...grpc.CallOption) (*ClosePublishersResponse, error) {
- out := new(ClosePublishersResponse)
- err := c.cc.Invoke(ctx, SeaweedMessaging_ClosePublishers_FullMethodName, in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *seaweedMessagingClient) CloseSubscribers(ctx context.Context, in *CloseSubscribersRequest, opts ...grpc.CallOption) (*CloseSubscribersResponse, error) {
- out := new(CloseSubscribersResponse)
- err := c.cc.Invoke(ctx, SeaweedMessaging_CloseSubscribers_FullMethodName, in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *seaweedMessagingClient) SubscriberToSubCoordinator(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_SubscriberToSubCoordinatorClient, error) {
- stream, err := c.cc.NewStream(ctx, &SeaweedMessaging_ServiceDesc.Streams[1], SeaweedMessaging_SubscriberToSubCoordinator_FullMethodName, opts...)
- if err != nil {
- return nil, err
- }
- x := &seaweedMessagingSubscriberToSubCoordinatorClient{stream}
- return x, nil
- }
- type SeaweedMessaging_SubscriberToSubCoordinatorClient interface {
- Send(*SubscriberToSubCoordinatorRequest) error
- Recv() (*SubscriberToSubCoordinatorResponse, error)
- grpc.ClientStream
- }
- type seaweedMessagingSubscriberToSubCoordinatorClient struct {
- grpc.ClientStream
- }
- func (x *seaweedMessagingSubscriberToSubCoordinatorClient) Send(m *SubscriberToSubCoordinatorRequest) error {
- return x.ClientStream.SendMsg(m)
- }
- func (x *seaweedMessagingSubscriberToSubCoordinatorClient) Recv() (*SubscriberToSubCoordinatorResponse, error) {
- m := new(SubscriberToSubCoordinatorResponse)
- if err := x.ClientStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
- }
- func (c *seaweedMessagingClient) PublishMessage(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_PublishMessageClient, error) {
- stream, err := c.cc.NewStream(ctx, &SeaweedMessaging_ServiceDesc.Streams[2], SeaweedMessaging_PublishMessage_FullMethodName, opts...)
- if err != nil {
- return nil, err
- }
- x := &seaweedMessagingPublishMessageClient{stream}
- return x, nil
- }
- type SeaweedMessaging_PublishMessageClient interface {
- Send(*PublishMessageRequest) error
- Recv() (*PublishMessageResponse, error)
- grpc.ClientStream
- }
- type seaweedMessagingPublishMessageClient struct {
- grpc.ClientStream
- }
- func (x *seaweedMessagingPublishMessageClient) Send(m *PublishMessageRequest) error {
- return x.ClientStream.SendMsg(m)
- }
- func (x *seaweedMessagingPublishMessageClient) Recv() (*PublishMessageResponse, error) {
- m := new(PublishMessageResponse)
- if err := x.ClientStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
- }
- func (c *seaweedMessagingClient) SubscribeMessage(ctx context.Context, in *SubscribeMessageRequest, opts ...grpc.CallOption) (SeaweedMessaging_SubscribeMessageClient, error) {
- stream, err := c.cc.NewStream(ctx, &SeaweedMessaging_ServiceDesc.Streams[3], SeaweedMessaging_SubscribeMessage_FullMethodName, opts...)
- if err != nil {
- return nil, err
- }
- x := &seaweedMessagingSubscribeMessageClient{stream}
- if err := x.ClientStream.SendMsg(in); err != nil {
- return nil, err
- }
- if err := x.ClientStream.CloseSend(); err != nil {
- return nil, err
- }
- return x, nil
- }
- type SeaweedMessaging_SubscribeMessageClient interface {
- Recv() (*SubscribeMessageResponse, error)
- grpc.ClientStream
- }
- type seaweedMessagingSubscribeMessageClient struct {
- grpc.ClientStream
- }
- func (x *seaweedMessagingSubscribeMessageClient) Recv() (*SubscribeMessageResponse, error) {
- m := new(SubscribeMessageResponse)
- if err := x.ClientStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
- }
- func (c *seaweedMessagingClient) PublishFollowMe(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_PublishFollowMeClient, error) {
- stream, err := c.cc.NewStream(ctx, &SeaweedMessaging_ServiceDesc.Streams[4], SeaweedMessaging_PublishFollowMe_FullMethodName, opts...)
- if err != nil {
- return nil, err
- }
- x := &seaweedMessagingPublishFollowMeClient{stream}
- return x, nil
- }
- type SeaweedMessaging_PublishFollowMeClient interface {
- Send(*PublishFollowMeRequest) error
- Recv() (*PublishFollowMeResponse, error)
- grpc.ClientStream
- }
- type seaweedMessagingPublishFollowMeClient struct {
- grpc.ClientStream
- }
- func (x *seaweedMessagingPublishFollowMeClient) Send(m *PublishFollowMeRequest) error {
- return x.ClientStream.SendMsg(m)
- }
- func (x *seaweedMessagingPublishFollowMeClient) Recv() (*PublishFollowMeResponse, error) {
- m := new(PublishFollowMeResponse)
- if err := x.ClientStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
- }
- // SeaweedMessagingServer is the server API for SeaweedMessaging service.
- // All implementations must embed UnimplementedSeaweedMessagingServer
- // for forward compatibility
- type SeaweedMessagingServer interface {
- // control plane
- FindBrokerLeader(context.Context, *FindBrokerLeaderRequest) (*FindBrokerLeaderResponse, error)
- // control plane for balancer
- PublisherToPubBalancer(SeaweedMessaging_PublisherToPubBalancerServer) error
- BalanceTopics(context.Context, *BalanceTopicsRequest) (*BalanceTopicsResponse, error)
- // control plane for topic partitions
- ListTopics(context.Context, *ListTopicsRequest) (*ListTopicsResponse, error)
- ConfigureTopic(context.Context, *ConfigureTopicRequest) (*ConfigureTopicResponse, error)
- LookupTopicBrokers(context.Context, *LookupTopicBrokersRequest) (*LookupTopicBrokersResponse, error)
- // invoked by the balancer, running on each broker
- AssignTopicPartitions(context.Context, *AssignTopicPartitionsRequest) (*AssignTopicPartitionsResponse, error)
- ClosePublishers(context.Context, *ClosePublishersRequest) (*ClosePublishersResponse, error)
- CloseSubscribers(context.Context, *CloseSubscribersRequest) (*CloseSubscribersResponse, error)
- // subscriber connects to broker balancer, which coordinates with the subscribers
- SubscriberToSubCoordinator(SeaweedMessaging_SubscriberToSubCoordinatorServer) error
- // data plane for each topic partition
- PublishMessage(SeaweedMessaging_PublishMessageServer) error
- SubscribeMessage(*SubscribeMessageRequest, SeaweedMessaging_SubscribeMessageServer) error
- // The lead broker asks a follower broker to follow itself
- PublishFollowMe(SeaweedMessaging_PublishFollowMeServer) error
- mustEmbedUnimplementedSeaweedMessagingServer()
- }
- // UnimplementedSeaweedMessagingServer must be embedded to have forward compatible implementations.
- type UnimplementedSeaweedMessagingServer struct {
- }
- func (UnimplementedSeaweedMessagingServer) FindBrokerLeader(context.Context, *FindBrokerLeaderRequest) (*FindBrokerLeaderResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method FindBrokerLeader not implemented")
- }
- func (UnimplementedSeaweedMessagingServer) PublisherToPubBalancer(SeaweedMessaging_PublisherToPubBalancerServer) error {
- return status.Errorf(codes.Unimplemented, "method PublisherToPubBalancer not implemented")
- }
- func (UnimplementedSeaweedMessagingServer) BalanceTopics(context.Context, *BalanceTopicsRequest) (*BalanceTopicsResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method BalanceTopics not implemented")
- }
- func (UnimplementedSeaweedMessagingServer) ListTopics(context.Context, *ListTopicsRequest) (*ListTopicsResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method ListTopics not implemented")
- }
- func (UnimplementedSeaweedMessagingServer) ConfigureTopic(context.Context, *ConfigureTopicRequest) (*ConfigureTopicResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method ConfigureTopic not implemented")
- }
- func (UnimplementedSeaweedMessagingServer) LookupTopicBrokers(context.Context, *LookupTopicBrokersRequest) (*LookupTopicBrokersResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method LookupTopicBrokers not implemented")
- }
- func (UnimplementedSeaweedMessagingServer) AssignTopicPartitions(context.Context, *AssignTopicPartitionsRequest) (*AssignTopicPartitionsResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method AssignTopicPartitions not implemented")
- }
- func (UnimplementedSeaweedMessagingServer) ClosePublishers(context.Context, *ClosePublishersRequest) (*ClosePublishersResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method ClosePublishers not implemented")
- }
- func (UnimplementedSeaweedMessagingServer) CloseSubscribers(context.Context, *CloseSubscribersRequest) (*CloseSubscribersResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method CloseSubscribers not implemented")
- }
- func (UnimplementedSeaweedMessagingServer) SubscriberToSubCoordinator(SeaweedMessaging_SubscriberToSubCoordinatorServer) error {
- return status.Errorf(codes.Unimplemented, "method SubscriberToSubCoordinator not implemented")
- }
- func (UnimplementedSeaweedMessagingServer) PublishMessage(SeaweedMessaging_PublishMessageServer) error {
- return status.Errorf(codes.Unimplemented, "method PublishMessage not implemented")
- }
- func (UnimplementedSeaweedMessagingServer) SubscribeMessage(*SubscribeMessageRequest, SeaweedMessaging_SubscribeMessageServer) error {
- return status.Errorf(codes.Unimplemented, "method SubscribeMessage not implemented")
- }
- func (UnimplementedSeaweedMessagingServer) PublishFollowMe(SeaweedMessaging_PublishFollowMeServer) error {
- return status.Errorf(codes.Unimplemented, "method PublishFollowMe not implemented")
- }
- func (UnimplementedSeaweedMessagingServer) mustEmbedUnimplementedSeaweedMessagingServer() {}
- // UnsafeSeaweedMessagingServer may be embedded to opt out of forward compatibility for this service.
- // Use of this interface is not recommended, as added methods to SeaweedMessagingServer will
- // result in compilation errors.
- type UnsafeSeaweedMessagingServer interface {
- mustEmbedUnimplementedSeaweedMessagingServer()
- }
- func RegisterSeaweedMessagingServer(s grpc.ServiceRegistrar, srv SeaweedMessagingServer) {
- s.RegisterService(&SeaweedMessaging_ServiceDesc, srv)
- }
- func _SeaweedMessaging_FindBrokerLeader_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(FindBrokerLeaderRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SeaweedMessagingServer).FindBrokerLeader(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: SeaweedMessaging_FindBrokerLeader_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SeaweedMessagingServer).FindBrokerLeader(ctx, req.(*FindBrokerLeaderRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _SeaweedMessaging_PublisherToPubBalancer_Handler(srv interface{}, stream grpc.ServerStream) error {
- return srv.(SeaweedMessagingServer).PublisherToPubBalancer(&seaweedMessagingPublisherToPubBalancerServer{stream})
- }
- type SeaweedMessaging_PublisherToPubBalancerServer interface {
- Send(*PublisherToPubBalancerResponse) error
- Recv() (*PublisherToPubBalancerRequest, error)
- grpc.ServerStream
- }
- type seaweedMessagingPublisherToPubBalancerServer struct {
- grpc.ServerStream
- }
- func (x *seaweedMessagingPublisherToPubBalancerServer) Send(m *PublisherToPubBalancerResponse) error {
- return x.ServerStream.SendMsg(m)
- }
- func (x *seaweedMessagingPublisherToPubBalancerServer) Recv() (*PublisherToPubBalancerRequest, error) {
- m := new(PublisherToPubBalancerRequest)
- if err := x.ServerStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
- }
- func _SeaweedMessaging_BalanceTopics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(BalanceTopicsRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SeaweedMessagingServer).BalanceTopics(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: SeaweedMessaging_BalanceTopics_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SeaweedMessagingServer).BalanceTopics(ctx, req.(*BalanceTopicsRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _SeaweedMessaging_ListTopics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(ListTopicsRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SeaweedMessagingServer).ListTopics(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: SeaweedMessaging_ListTopics_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SeaweedMessagingServer).ListTopics(ctx, req.(*ListTopicsRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _SeaweedMessaging_ConfigureTopic_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(ConfigureTopicRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SeaweedMessagingServer).ConfigureTopic(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: SeaweedMessaging_ConfigureTopic_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SeaweedMessagingServer).ConfigureTopic(ctx, req.(*ConfigureTopicRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _SeaweedMessaging_LookupTopicBrokers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(LookupTopicBrokersRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SeaweedMessagingServer).LookupTopicBrokers(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: SeaweedMessaging_LookupTopicBrokers_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SeaweedMessagingServer).LookupTopicBrokers(ctx, req.(*LookupTopicBrokersRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _SeaweedMessaging_AssignTopicPartitions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(AssignTopicPartitionsRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SeaweedMessagingServer).AssignTopicPartitions(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: SeaweedMessaging_AssignTopicPartitions_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SeaweedMessagingServer).AssignTopicPartitions(ctx, req.(*AssignTopicPartitionsRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _SeaweedMessaging_ClosePublishers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(ClosePublishersRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SeaweedMessagingServer).ClosePublishers(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: SeaweedMessaging_ClosePublishers_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SeaweedMessagingServer).ClosePublishers(ctx, req.(*ClosePublishersRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _SeaweedMessaging_CloseSubscribers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(CloseSubscribersRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SeaweedMessagingServer).CloseSubscribers(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: SeaweedMessaging_CloseSubscribers_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SeaweedMessagingServer).CloseSubscribers(ctx, req.(*CloseSubscribersRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _SeaweedMessaging_SubscriberToSubCoordinator_Handler(srv interface{}, stream grpc.ServerStream) error {
- return srv.(SeaweedMessagingServer).SubscriberToSubCoordinator(&seaweedMessagingSubscriberToSubCoordinatorServer{stream})
- }
- type SeaweedMessaging_SubscriberToSubCoordinatorServer interface {
- Send(*SubscriberToSubCoordinatorResponse) error
- Recv() (*SubscriberToSubCoordinatorRequest, error)
- grpc.ServerStream
- }
- type seaweedMessagingSubscriberToSubCoordinatorServer struct {
- grpc.ServerStream
- }
- func (x *seaweedMessagingSubscriberToSubCoordinatorServer) Send(m *SubscriberToSubCoordinatorResponse) error {
- return x.ServerStream.SendMsg(m)
- }
- func (x *seaweedMessagingSubscriberToSubCoordinatorServer) Recv() (*SubscriberToSubCoordinatorRequest, error) {
- m := new(SubscriberToSubCoordinatorRequest)
- if err := x.ServerStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
- }
- func _SeaweedMessaging_PublishMessage_Handler(srv interface{}, stream grpc.ServerStream) error {
- return srv.(SeaweedMessagingServer).PublishMessage(&seaweedMessagingPublishMessageServer{stream})
- }
- type SeaweedMessaging_PublishMessageServer interface {
- Send(*PublishMessageResponse) error
- Recv() (*PublishMessageRequest, error)
- grpc.ServerStream
- }
- type seaweedMessagingPublishMessageServer struct {
- grpc.ServerStream
- }
- func (x *seaweedMessagingPublishMessageServer) Send(m *PublishMessageResponse) error {
- return x.ServerStream.SendMsg(m)
- }
- func (x *seaweedMessagingPublishMessageServer) Recv() (*PublishMessageRequest, error) {
- m := new(PublishMessageRequest)
- if err := x.ServerStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
- }
- func _SeaweedMessaging_SubscribeMessage_Handler(srv interface{}, stream grpc.ServerStream) error {
- m := new(SubscribeMessageRequest)
- if err := stream.RecvMsg(m); err != nil {
- return err
- }
- return srv.(SeaweedMessagingServer).SubscribeMessage(m, &seaweedMessagingSubscribeMessageServer{stream})
- }
- type SeaweedMessaging_SubscribeMessageServer interface {
- Send(*SubscribeMessageResponse) error
- grpc.ServerStream
- }
- type seaweedMessagingSubscribeMessageServer struct {
- grpc.ServerStream
- }
- func (x *seaweedMessagingSubscribeMessageServer) Send(m *SubscribeMessageResponse) error {
- return x.ServerStream.SendMsg(m)
- }
- func _SeaweedMessaging_PublishFollowMe_Handler(srv interface{}, stream grpc.ServerStream) error {
- return srv.(SeaweedMessagingServer).PublishFollowMe(&seaweedMessagingPublishFollowMeServer{stream})
- }
- type SeaweedMessaging_PublishFollowMeServer interface {
- Send(*PublishFollowMeResponse) error
- Recv() (*PublishFollowMeRequest, error)
- grpc.ServerStream
- }
- type seaweedMessagingPublishFollowMeServer struct {
- grpc.ServerStream
- }
- func (x *seaweedMessagingPublishFollowMeServer) Send(m *PublishFollowMeResponse) error {
- return x.ServerStream.SendMsg(m)
- }
- func (x *seaweedMessagingPublishFollowMeServer) Recv() (*PublishFollowMeRequest, error) {
- m := new(PublishFollowMeRequest)
- if err := x.ServerStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
- }
- // SeaweedMessaging_ServiceDesc is the grpc.ServiceDesc for SeaweedMessaging service.
- // It's only intended for direct use with grpc.RegisterService,
- // and not to be introspected or modified (even as a copy)
- var SeaweedMessaging_ServiceDesc = grpc.ServiceDesc{
- ServiceName: "messaging_pb.SeaweedMessaging",
- HandlerType: (*SeaweedMessagingServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "FindBrokerLeader",
- Handler: _SeaweedMessaging_FindBrokerLeader_Handler,
- },
- {
- MethodName: "BalanceTopics",
- Handler: _SeaweedMessaging_BalanceTopics_Handler,
- },
- {
- MethodName: "ListTopics",
- Handler: _SeaweedMessaging_ListTopics_Handler,
- },
- {
- MethodName: "ConfigureTopic",
- Handler: _SeaweedMessaging_ConfigureTopic_Handler,
- },
- {
- MethodName: "LookupTopicBrokers",
- Handler: _SeaweedMessaging_LookupTopicBrokers_Handler,
- },
- {
- MethodName: "AssignTopicPartitions",
- Handler: _SeaweedMessaging_AssignTopicPartitions_Handler,
- },
- {
- MethodName: "ClosePublishers",
- Handler: _SeaweedMessaging_ClosePublishers_Handler,
- },
- {
- MethodName: "CloseSubscribers",
- Handler: _SeaweedMessaging_CloseSubscribers_Handler,
- },
- },
- Streams: []grpc.StreamDesc{
- {
- StreamName: "PublisherToPubBalancer",
- Handler: _SeaweedMessaging_PublisherToPubBalancer_Handler,
- ServerStreams: true,
- ClientStreams: true,
- },
- {
- StreamName: "SubscriberToSubCoordinator",
- Handler: _SeaweedMessaging_SubscriberToSubCoordinator_Handler,
- ServerStreams: true,
- ClientStreams: true,
- },
- {
- StreamName: "PublishMessage",
- Handler: _SeaweedMessaging_PublishMessage_Handler,
- ServerStreams: true,
- ClientStreams: true,
- },
- {
- StreamName: "SubscribeMessage",
- Handler: _SeaweedMessaging_SubscribeMessage_Handler,
- ServerStreams: true,
- },
- {
- StreamName: "PublishFollowMe",
- Handler: _SeaweedMessaging_PublishFollowMe_Handler,
- ServerStreams: true,
- ClientStreams: true,
- },
- },
- Metadata: "mq.proto",
- }
|