123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675 |
- // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
- // versions:
- // - protoc-gen-go-grpc v1.2.0
- // - protoc v4.23.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
- // 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)
- AssignSegmentBrokers(ctx context.Context, in *AssignSegmentBrokersRequest, opts ...grpc.CallOption) (*AssignSegmentBrokersResponse, error)
- CheckSegmentStatus(ctx context.Context, in *CheckSegmentStatusRequest, opts ...grpc.CallOption) (*CheckSegmentStatusResponse, error)
- CheckBrokerLoad(ctx context.Context, in *CheckBrokerLoadRequest, opts ...grpc.CallOption) (*CheckBrokerLoadResponse, error)
- // control plane for balancer
- ConnectToBalancer(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_ConnectToBalancerClient, error)
- // control plane for topic partitions
- LookupTopicBrokers(ctx context.Context, in *LookupTopicBrokersRequest, opts ...grpc.CallOption) (*LookupTopicBrokersResponse, error)
- CreateTopic(ctx context.Context, in *CreateTopicRequest, opts ...grpc.CallOption) (*CreateTopicResponse, error)
- DoCreateTopic(ctx context.Context, in *DoCreateTopicRequest, opts ...grpc.CallOption) (*DoCreateTopicResponse, error)
- ListTopics(ctx context.Context, in *ListTopicsRequest, opts ...grpc.CallOption) (*ListTopicsResponse, error)
- // a pub client will call this to get the topic partitions assignment
- RequestTopicPartitions(ctx context.Context, in *RequestTopicPartitionsRequest, opts ...grpc.CallOption) (*RequestTopicPartitionsResponse, error)
- AssignTopicPartitions(ctx context.Context, in *AssignTopicPartitionsRequest, opts ...grpc.CallOption) (*AssignTopicPartitionsResponse, error)
- CheckTopicPartitionsStatus(ctx context.Context, in *CheckTopicPartitionsStatusRequest, opts ...grpc.CallOption) (*CheckTopicPartitionsStatusResponse, error)
- // data plane
- Publish(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_PublishClient, error)
- Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (SeaweedMessaging_SubscribeClient, 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, "/messaging_pb.SeaweedMessaging/FindBrokerLeader", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *seaweedMessagingClient) AssignSegmentBrokers(ctx context.Context, in *AssignSegmentBrokersRequest, opts ...grpc.CallOption) (*AssignSegmentBrokersResponse, error) {
- out := new(AssignSegmentBrokersResponse)
- err := c.cc.Invoke(ctx, "/messaging_pb.SeaweedMessaging/AssignSegmentBrokers", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *seaweedMessagingClient) CheckSegmentStatus(ctx context.Context, in *CheckSegmentStatusRequest, opts ...grpc.CallOption) (*CheckSegmentStatusResponse, error) {
- out := new(CheckSegmentStatusResponse)
- err := c.cc.Invoke(ctx, "/messaging_pb.SeaweedMessaging/CheckSegmentStatus", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *seaweedMessagingClient) CheckBrokerLoad(ctx context.Context, in *CheckBrokerLoadRequest, opts ...grpc.CallOption) (*CheckBrokerLoadResponse, error) {
- out := new(CheckBrokerLoadResponse)
- err := c.cc.Invoke(ctx, "/messaging_pb.SeaweedMessaging/CheckBrokerLoad", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *seaweedMessagingClient) ConnectToBalancer(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_ConnectToBalancerClient, error) {
- stream, err := c.cc.NewStream(ctx, &SeaweedMessaging_ServiceDesc.Streams[0], "/messaging_pb.SeaweedMessaging/ConnectToBalancer", opts...)
- if err != nil {
- return nil, err
- }
- x := &seaweedMessagingConnectToBalancerClient{stream}
- return x, nil
- }
- type SeaweedMessaging_ConnectToBalancerClient interface {
- Send(*ConnectToBalancerRequest) error
- Recv() (*ConnectToBalancerResponse, error)
- grpc.ClientStream
- }
- type seaweedMessagingConnectToBalancerClient struct {
- grpc.ClientStream
- }
- func (x *seaweedMessagingConnectToBalancerClient) Send(m *ConnectToBalancerRequest) error {
- return x.ClientStream.SendMsg(m)
- }
- func (x *seaweedMessagingConnectToBalancerClient) Recv() (*ConnectToBalancerResponse, error) {
- m := new(ConnectToBalancerResponse)
- if err := x.ClientStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
- }
- func (c *seaweedMessagingClient) LookupTopicBrokers(ctx context.Context, in *LookupTopicBrokersRequest, opts ...grpc.CallOption) (*LookupTopicBrokersResponse, error) {
- out := new(LookupTopicBrokersResponse)
- err := c.cc.Invoke(ctx, "/messaging_pb.SeaweedMessaging/LookupTopicBrokers", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *seaweedMessagingClient) CreateTopic(ctx context.Context, in *CreateTopicRequest, opts ...grpc.CallOption) (*CreateTopicResponse, error) {
- out := new(CreateTopicResponse)
- err := c.cc.Invoke(ctx, "/messaging_pb.SeaweedMessaging/CreateTopic", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *seaweedMessagingClient) DoCreateTopic(ctx context.Context, in *DoCreateTopicRequest, opts ...grpc.CallOption) (*DoCreateTopicResponse, error) {
- out := new(DoCreateTopicResponse)
- err := c.cc.Invoke(ctx, "/messaging_pb.SeaweedMessaging/DoCreateTopic", 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, "/messaging_pb.SeaweedMessaging/ListTopics", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *seaweedMessagingClient) RequestTopicPartitions(ctx context.Context, in *RequestTopicPartitionsRequest, opts ...grpc.CallOption) (*RequestTopicPartitionsResponse, error) {
- out := new(RequestTopicPartitionsResponse)
- err := c.cc.Invoke(ctx, "/messaging_pb.SeaweedMessaging/RequestTopicPartitions", 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, "/messaging_pb.SeaweedMessaging/AssignTopicPartitions", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *seaweedMessagingClient) CheckTopicPartitionsStatus(ctx context.Context, in *CheckTopicPartitionsStatusRequest, opts ...grpc.CallOption) (*CheckTopicPartitionsStatusResponse, error) {
- out := new(CheckTopicPartitionsStatusResponse)
- err := c.cc.Invoke(ctx, "/messaging_pb.SeaweedMessaging/CheckTopicPartitionsStatus", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *seaweedMessagingClient) Publish(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_PublishClient, error) {
- stream, err := c.cc.NewStream(ctx, &SeaweedMessaging_ServiceDesc.Streams[1], "/messaging_pb.SeaweedMessaging/Publish", opts...)
- if err != nil {
- return nil, err
- }
- x := &seaweedMessagingPublishClient{stream}
- return x, nil
- }
- type SeaweedMessaging_PublishClient interface {
- Send(*PublishRequest) error
- Recv() (*PublishResponse, error)
- grpc.ClientStream
- }
- type seaweedMessagingPublishClient struct {
- grpc.ClientStream
- }
- func (x *seaweedMessagingPublishClient) Send(m *PublishRequest) error {
- return x.ClientStream.SendMsg(m)
- }
- func (x *seaweedMessagingPublishClient) Recv() (*PublishResponse, error) {
- m := new(PublishResponse)
- if err := x.ClientStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
- }
- func (c *seaweedMessagingClient) Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (SeaweedMessaging_SubscribeClient, error) {
- stream, err := c.cc.NewStream(ctx, &SeaweedMessaging_ServiceDesc.Streams[2], "/messaging_pb.SeaweedMessaging/Subscribe", opts...)
- if err != nil {
- return nil, err
- }
- x := &seaweedMessagingSubscribeClient{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_SubscribeClient interface {
- Recv() (*SubscribeResponse, error)
- grpc.ClientStream
- }
- type seaweedMessagingSubscribeClient struct {
- grpc.ClientStream
- }
- func (x *seaweedMessagingSubscribeClient) Recv() (*SubscribeResponse, error) {
- m := new(SubscribeResponse)
- 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)
- AssignSegmentBrokers(context.Context, *AssignSegmentBrokersRequest) (*AssignSegmentBrokersResponse, error)
- CheckSegmentStatus(context.Context, *CheckSegmentStatusRequest) (*CheckSegmentStatusResponse, error)
- CheckBrokerLoad(context.Context, *CheckBrokerLoadRequest) (*CheckBrokerLoadResponse, error)
- // control plane for balancer
- ConnectToBalancer(SeaweedMessaging_ConnectToBalancerServer) error
- // control plane for topic partitions
- LookupTopicBrokers(context.Context, *LookupTopicBrokersRequest) (*LookupTopicBrokersResponse, error)
- CreateTopic(context.Context, *CreateTopicRequest) (*CreateTopicResponse, error)
- DoCreateTopic(context.Context, *DoCreateTopicRequest) (*DoCreateTopicResponse, error)
- ListTopics(context.Context, *ListTopicsRequest) (*ListTopicsResponse, error)
- // a pub client will call this to get the topic partitions assignment
- RequestTopicPartitions(context.Context, *RequestTopicPartitionsRequest) (*RequestTopicPartitionsResponse, error)
- AssignTopicPartitions(context.Context, *AssignTopicPartitionsRequest) (*AssignTopicPartitionsResponse, error)
- CheckTopicPartitionsStatus(context.Context, *CheckTopicPartitionsStatusRequest) (*CheckTopicPartitionsStatusResponse, error)
- // data plane
- Publish(SeaweedMessaging_PublishServer) error
- Subscribe(*SubscribeRequest, SeaweedMessaging_SubscribeServer) 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) AssignSegmentBrokers(context.Context, *AssignSegmentBrokersRequest) (*AssignSegmentBrokersResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method AssignSegmentBrokers not implemented")
- }
- func (UnimplementedSeaweedMessagingServer) CheckSegmentStatus(context.Context, *CheckSegmentStatusRequest) (*CheckSegmentStatusResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method CheckSegmentStatus not implemented")
- }
- func (UnimplementedSeaweedMessagingServer) CheckBrokerLoad(context.Context, *CheckBrokerLoadRequest) (*CheckBrokerLoadResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method CheckBrokerLoad not implemented")
- }
- func (UnimplementedSeaweedMessagingServer) ConnectToBalancer(SeaweedMessaging_ConnectToBalancerServer) error {
- return status.Errorf(codes.Unimplemented, "method ConnectToBalancer not implemented")
- }
- func (UnimplementedSeaweedMessagingServer) LookupTopicBrokers(context.Context, *LookupTopicBrokersRequest) (*LookupTopicBrokersResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method LookupTopicBrokers not implemented")
- }
- func (UnimplementedSeaweedMessagingServer) CreateTopic(context.Context, *CreateTopicRequest) (*CreateTopicResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method CreateTopic not implemented")
- }
- func (UnimplementedSeaweedMessagingServer) DoCreateTopic(context.Context, *DoCreateTopicRequest) (*DoCreateTopicResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method DoCreateTopic not implemented")
- }
- func (UnimplementedSeaweedMessagingServer) ListTopics(context.Context, *ListTopicsRequest) (*ListTopicsResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method ListTopics not implemented")
- }
- func (UnimplementedSeaweedMessagingServer) RequestTopicPartitions(context.Context, *RequestTopicPartitionsRequest) (*RequestTopicPartitionsResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method RequestTopicPartitions not implemented")
- }
- func (UnimplementedSeaweedMessagingServer) AssignTopicPartitions(context.Context, *AssignTopicPartitionsRequest) (*AssignTopicPartitionsResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method AssignTopicPartitions not implemented")
- }
- func (UnimplementedSeaweedMessagingServer) CheckTopicPartitionsStatus(context.Context, *CheckTopicPartitionsStatusRequest) (*CheckTopicPartitionsStatusResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method CheckTopicPartitionsStatus not implemented")
- }
- func (UnimplementedSeaweedMessagingServer) Publish(SeaweedMessaging_PublishServer) error {
- return status.Errorf(codes.Unimplemented, "method Publish not implemented")
- }
- func (UnimplementedSeaweedMessagingServer) Subscribe(*SubscribeRequest, SeaweedMessaging_SubscribeServer) error {
- return status.Errorf(codes.Unimplemented, "method Subscribe 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: "/messaging_pb.SeaweedMessaging/FindBrokerLeader",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SeaweedMessagingServer).FindBrokerLeader(ctx, req.(*FindBrokerLeaderRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _SeaweedMessaging_AssignSegmentBrokers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(AssignSegmentBrokersRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SeaweedMessagingServer).AssignSegmentBrokers(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/messaging_pb.SeaweedMessaging/AssignSegmentBrokers",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SeaweedMessagingServer).AssignSegmentBrokers(ctx, req.(*AssignSegmentBrokersRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _SeaweedMessaging_CheckSegmentStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(CheckSegmentStatusRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SeaweedMessagingServer).CheckSegmentStatus(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/messaging_pb.SeaweedMessaging/CheckSegmentStatus",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SeaweedMessagingServer).CheckSegmentStatus(ctx, req.(*CheckSegmentStatusRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _SeaweedMessaging_CheckBrokerLoad_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(CheckBrokerLoadRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SeaweedMessagingServer).CheckBrokerLoad(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/messaging_pb.SeaweedMessaging/CheckBrokerLoad",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SeaweedMessagingServer).CheckBrokerLoad(ctx, req.(*CheckBrokerLoadRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _SeaweedMessaging_ConnectToBalancer_Handler(srv interface{}, stream grpc.ServerStream) error {
- return srv.(SeaweedMessagingServer).ConnectToBalancer(&seaweedMessagingConnectToBalancerServer{stream})
- }
- type SeaweedMessaging_ConnectToBalancerServer interface {
- Send(*ConnectToBalancerResponse) error
- Recv() (*ConnectToBalancerRequest, error)
- grpc.ServerStream
- }
- type seaweedMessagingConnectToBalancerServer struct {
- grpc.ServerStream
- }
- func (x *seaweedMessagingConnectToBalancerServer) Send(m *ConnectToBalancerResponse) error {
- return x.ServerStream.SendMsg(m)
- }
- func (x *seaweedMessagingConnectToBalancerServer) Recv() (*ConnectToBalancerRequest, error) {
- m := new(ConnectToBalancerRequest)
- if err := x.ServerStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
- }
- 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: "/messaging_pb.SeaweedMessaging/LookupTopicBrokers",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SeaweedMessagingServer).LookupTopicBrokers(ctx, req.(*LookupTopicBrokersRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _SeaweedMessaging_CreateTopic_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(CreateTopicRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SeaweedMessagingServer).CreateTopic(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/messaging_pb.SeaweedMessaging/CreateTopic",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SeaweedMessagingServer).CreateTopic(ctx, req.(*CreateTopicRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _SeaweedMessaging_DoCreateTopic_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(DoCreateTopicRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SeaweedMessagingServer).DoCreateTopic(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/messaging_pb.SeaweedMessaging/DoCreateTopic",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SeaweedMessagingServer).DoCreateTopic(ctx, req.(*DoCreateTopicRequest))
- }
- 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: "/messaging_pb.SeaweedMessaging/ListTopics",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SeaweedMessagingServer).ListTopics(ctx, req.(*ListTopicsRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _SeaweedMessaging_RequestTopicPartitions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(RequestTopicPartitionsRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SeaweedMessagingServer).RequestTopicPartitions(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/messaging_pb.SeaweedMessaging/RequestTopicPartitions",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SeaweedMessagingServer).RequestTopicPartitions(ctx, req.(*RequestTopicPartitionsRequest))
- }
- 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: "/messaging_pb.SeaweedMessaging/AssignTopicPartitions",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SeaweedMessagingServer).AssignTopicPartitions(ctx, req.(*AssignTopicPartitionsRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _SeaweedMessaging_CheckTopicPartitionsStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(CheckTopicPartitionsStatusRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SeaweedMessagingServer).CheckTopicPartitionsStatus(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/messaging_pb.SeaweedMessaging/CheckTopicPartitionsStatus",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SeaweedMessagingServer).CheckTopicPartitionsStatus(ctx, req.(*CheckTopicPartitionsStatusRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _SeaweedMessaging_Publish_Handler(srv interface{}, stream grpc.ServerStream) error {
- return srv.(SeaweedMessagingServer).Publish(&seaweedMessagingPublishServer{stream})
- }
- type SeaweedMessaging_PublishServer interface {
- Send(*PublishResponse) error
- Recv() (*PublishRequest, error)
- grpc.ServerStream
- }
- type seaweedMessagingPublishServer struct {
- grpc.ServerStream
- }
- func (x *seaweedMessagingPublishServer) Send(m *PublishResponse) error {
- return x.ServerStream.SendMsg(m)
- }
- func (x *seaweedMessagingPublishServer) Recv() (*PublishRequest, error) {
- m := new(PublishRequest)
- if err := x.ServerStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
- }
- func _SeaweedMessaging_Subscribe_Handler(srv interface{}, stream grpc.ServerStream) error {
- m := new(SubscribeRequest)
- if err := stream.RecvMsg(m); err != nil {
- return err
- }
- return srv.(SeaweedMessagingServer).Subscribe(m, &seaweedMessagingSubscribeServer{stream})
- }
- type SeaweedMessaging_SubscribeServer interface {
- Send(*SubscribeResponse) error
- grpc.ServerStream
- }
- type seaweedMessagingSubscribeServer struct {
- grpc.ServerStream
- }
- func (x *seaweedMessagingSubscribeServer) Send(m *SubscribeResponse) error {
- return x.ServerStream.SendMsg(m)
- }
- // 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: "AssignSegmentBrokers",
- Handler: _SeaweedMessaging_AssignSegmentBrokers_Handler,
- },
- {
- MethodName: "CheckSegmentStatus",
- Handler: _SeaweedMessaging_CheckSegmentStatus_Handler,
- },
- {
- MethodName: "CheckBrokerLoad",
- Handler: _SeaweedMessaging_CheckBrokerLoad_Handler,
- },
- {
- MethodName: "LookupTopicBrokers",
- Handler: _SeaweedMessaging_LookupTopicBrokers_Handler,
- },
- {
- MethodName: "CreateTopic",
- Handler: _SeaweedMessaging_CreateTopic_Handler,
- },
- {
- MethodName: "DoCreateTopic",
- Handler: _SeaweedMessaging_DoCreateTopic_Handler,
- },
- {
- MethodName: "ListTopics",
- Handler: _SeaweedMessaging_ListTopics_Handler,
- },
- {
- MethodName: "RequestTopicPartitions",
- Handler: _SeaweedMessaging_RequestTopicPartitions_Handler,
- },
- {
- MethodName: "AssignTopicPartitions",
- Handler: _SeaweedMessaging_AssignTopicPartitions_Handler,
- },
- {
- MethodName: "CheckTopicPartitionsStatus",
- Handler: _SeaweedMessaging_CheckTopicPartitionsStatus_Handler,
- },
- },
- Streams: []grpc.StreamDesc{
- {
- StreamName: "ConnectToBalancer",
- Handler: _SeaweedMessaging_ConnectToBalancer_Handler,
- ServerStreams: true,
- ClientStreams: true,
- },
- {
- StreamName: "Publish",
- Handler: _SeaweedMessaging_Publish_Handler,
- ServerStreams: true,
- ClientStreams: true,
- },
- {
- StreamName: "Subscribe",
- Handler: _SeaweedMessaging_Subscribe_Handler,
- ServerStreams: true,
- },
- },
- Metadata: "mq.proto",
- }
|