2021-12-05 08:42:25 +00:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
2023-02-06 05:24:21 +00:00
// versions:
2023-06-20 01:19:13 +00:00
// - protoc-gen-go-grpc v1.2.0
// - protoc v4.23.3
2023-02-06 05:24:21 +00:00
// source: mq.proto
2021-12-05 08:42:25 +00:00
2022-07-02 05:43:25 +00:00
package mq_pb
2021-12-05 08:42:25 +00:00
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.
2022-09-07 06:51:27 +00:00
// Requires gRPC-Go v1.32.0 or later.
2021-12-05 08:42:25 +00:00
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 {
2022-07-31 20:23:44 +00:00
// control plane
2022-07-10 19:11:37 +00:00
FindBrokerLeader ( ctx context . Context , in * FindBrokerLeaderRequest , opts ... grpc . CallOption ) ( * FindBrokerLeaderResponse , error )
2022-07-11 07:20:27 +00:00
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 )
2023-09-15 06:49:05 +00:00
// control plane for balancer
2023-10-13 03:28:11 +00:00
ConnectToBalancer ( ctx context . Context , opts ... grpc . CallOption ) ( SeaweedMessaging_ConnectToBalancerClient , error )
2023-10-01 04:47:57 +00:00
DoConfigureTopic ( ctx context . Context , in * DoConfigureTopicRequest , opts ... grpc . CallOption ) ( * DoConfigureTopicResponse , error )
2023-08-21 05:53:05 +00:00
// control plane for topic partitions
2023-08-28 01:59:04 +00:00
LookupTopicBrokers ( ctx context . Context , in * LookupTopicBrokersRequest , opts ... grpc . CallOption ) ( * LookupTopicBrokersResponse , error )
2023-09-26 22:17:33 +00:00
ConfigureTopic ( ctx context . Context , in * ConfigureTopicRequest , opts ... grpc . CallOption ) ( * ConfigureTopicResponse , error )
2023-09-25 04:19:51 +00:00
ListTopics ( ctx context . Context , in * ListTopicsRequest , opts ... grpc . CallOption ) ( * ListTopicsResponse , error )
2023-08-21 05:53:05 +00:00
// 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 )
2022-07-31 20:23:44 +00:00
// data plane
Publish ( ctx context . Context , opts ... grpc . CallOption ) ( SeaweedMessaging_PublishClient , error )
2023-08-27 20:13:14 +00:00
Subscribe ( ctx context . Context , in * SubscribeRequest , opts ... grpc . CallOption ) ( SeaweedMessaging_SubscribeClient , error )
2021-12-05 08:42:25 +00:00
}
type seaweedMessagingClient struct {
cc grpc . ClientConnInterface
}
func NewSeaweedMessagingClient ( cc grpc . ClientConnInterface ) SeaweedMessagingClient {
return & seaweedMessagingClient { cc }
}
2022-07-10 19:11:37 +00:00
func ( c * seaweedMessagingClient ) FindBrokerLeader ( ctx context . Context , in * FindBrokerLeaderRequest , opts ... grpc . CallOption ) ( * FindBrokerLeaderResponse , error ) {
out := new ( FindBrokerLeaderResponse )
2023-06-20 01:19:13 +00:00
err := c . cc . Invoke ( ctx , "/messaging_pb.SeaweedMessaging/FindBrokerLeader" , in , out , opts ... )
2021-12-05 08:42:25 +00:00
if err != nil {
return nil , err
}
return out , nil
}
2022-07-11 07:20:27 +00:00
func ( c * seaweedMessagingClient ) AssignSegmentBrokers ( ctx context . Context , in * AssignSegmentBrokersRequest , opts ... grpc . CallOption ) ( * AssignSegmentBrokersResponse , error ) {
out := new ( AssignSegmentBrokersResponse )
2023-06-20 01:19:13 +00:00
err := c . cc . Invoke ( ctx , "/messaging_pb.SeaweedMessaging/AssignSegmentBrokers" , in , out , opts ... )
2022-07-11 07:20:27 +00:00
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 )
2023-06-20 01:19:13 +00:00
err := c . cc . Invoke ( ctx , "/messaging_pb.SeaweedMessaging/CheckSegmentStatus" , in , out , opts ... )
2022-07-11 07:20:27 +00:00
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 )
2023-06-20 01:19:13 +00:00
err := c . cc . Invoke ( ctx , "/messaging_pb.SeaweedMessaging/CheckBrokerLoad" , in , out , opts ... )
2022-07-11 07:20:27 +00:00
if err != nil {
return nil , err
}
return out , nil
}
2023-10-13 03:28:11 +00:00
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 ... )
2023-09-15 06:49:05 +00:00
if err != nil {
return nil , err
}
2023-10-13 03:28:11 +00:00
x := & seaweedMessagingConnectToBalancerClient { stream }
2023-09-15 06:49:05 +00:00
return x , nil
}
2023-10-13 03:28:11 +00:00
type SeaweedMessaging_ConnectToBalancerClient interface {
Send ( * ConnectToBalancerRequest ) error
Recv ( ) ( * ConnectToBalancerResponse , error )
2023-09-15 06:49:05 +00:00
grpc . ClientStream
}
2023-10-13 03:28:11 +00:00
type seaweedMessagingConnectToBalancerClient struct {
2023-09-15 06:49:05 +00:00
grpc . ClientStream
}
2023-10-13 03:28:11 +00:00
func ( x * seaweedMessagingConnectToBalancerClient ) Send ( m * ConnectToBalancerRequest ) error {
2023-09-15 06:49:05 +00:00
return x . ClientStream . SendMsg ( m )
}
2023-10-13 03:28:11 +00:00
func ( x * seaweedMessagingConnectToBalancerClient ) Recv ( ) ( * ConnectToBalancerResponse , error ) {
m := new ( ConnectToBalancerResponse )
2023-09-15 06:49:05 +00:00
if err := x . ClientStream . RecvMsg ( m ) ; err != nil {
return nil , err
}
return m , nil
}
2023-10-01 04:47:57 +00:00
func ( c * seaweedMessagingClient ) DoConfigureTopic ( ctx context . Context , in * DoConfigureTopicRequest , opts ... grpc . CallOption ) ( * DoConfigureTopicResponse , error ) {
out := new ( DoConfigureTopicResponse )
err := c . cc . Invoke ( ctx , "/messaging_pb.SeaweedMessaging/DoConfigureTopic" , in , out , opts ... )
2023-08-21 05:53:05 +00:00
if err != nil {
return nil , err
}
return out , nil
}
2023-10-01 04:47:57 +00:00
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 ... )
2023-09-24 21:22:11 +00:00
if err != nil {
return nil , err
}
return out , nil
}
2023-10-01 04:47:57 +00:00
func ( c * seaweedMessagingClient ) ConfigureTopic ( ctx context . Context , in * ConfigureTopicRequest , opts ... grpc . CallOption ) ( * ConfigureTopicResponse , error ) {
out := new ( ConfigureTopicResponse )
err := c . cc . Invoke ( ctx , "/messaging_pb.SeaweedMessaging/ConfigureTopic" , in , out , opts ... )
2023-09-24 22:26:49 +00:00
if err != nil {
return nil , err
}
return out , nil
}
2023-09-25 04:19:51 +00:00
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
}
2023-08-21 05:53:05 +00:00
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
}
2022-07-31 20:23:44 +00:00
func ( c * seaweedMessagingClient ) Publish ( ctx context . Context , opts ... grpc . CallOption ) ( SeaweedMessaging_PublishClient , error ) {
2023-09-15 06:49:05 +00:00
stream , err := c . cc . NewStream ( ctx , & SeaweedMessaging_ServiceDesc . Streams [ 1 ] , "/messaging_pb.SeaweedMessaging/Publish" , opts ... )
2022-07-31 20:23:44 +00:00
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
}
2023-08-27 20:13:14 +00:00
func ( c * seaweedMessagingClient ) Subscribe ( ctx context . Context , in * SubscribeRequest , opts ... grpc . CallOption ) ( SeaweedMessaging_SubscribeClient , error ) {
2023-09-15 06:49:05 +00:00
stream , err := c . cc . NewStream ( ctx , & SeaweedMessaging_ServiceDesc . Streams [ 2 ] , "/messaging_pb.SeaweedMessaging/Subscribe" , opts ... )
2023-08-26 20:39:21 +00:00
if err != nil {
return nil , err
}
x := & seaweedMessagingSubscribeClient { stream }
2023-08-27 20:13:14 +00:00
if err := x . ClientStream . SendMsg ( in ) ; err != nil {
return nil , err
}
if err := x . ClientStream . CloseSend ( ) ; err != nil {
return nil , err
}
2023-08-26 20:39:21 +00:00
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
}
2021-12-05 08:42:25 +00:00
// SeaweedMessagingServer is the server API for SeaweedMessaging service.
// All implementations must embed UnimplementedSeaweedMessagingServer
// for forward compatibility
type SeaweedMessagingServer interface {
2022-07-31 20:23:44 +00:00
// control plane
2022-07-10 19:11:37 +00:00
FindBrokerLeader ( context . Context , * FindBrokerLeaderRequest ) ( * FindBrokerLeaderResponse , error )
2022-07-11 07:20:27 +00:00
AssignSegmentBrokers ( context . Context , * AssignSegmentBrokersRequest ) ( * AssignSegmentBrokersResponse , error )
CheckSegmentStatus ( context . Context , * CheckSegmentStatusRequest ) ( * CheckSegmentStatusResponse , error )
CheckBrokerLoad ( context . Context , * CheckBrokerLoadRequest ) ( * CheckBrokerLoadResponse , error )
2023-09-15 06:49:05 +00:00
// control plane for balancer
2023-10-13 03:28:11 +00:00
ConnectToBalancer ( SeaweedMessaging_ConnectToBalancerServer ) error
2023-10-01 04:47:57 +00:00
DoConfigureTopic ( context . Context , * DoConfigureTopicRequest ) ( * DoConfigureTopicResponse , error )
2023-08-21 05:53:05 +00:00
// control plane for topic partitions
2023-08-28 01:59:04 +00:00
LookupTopicBrokers ( context . Context , * LookupTopicBrokersRequest ) ( * LookupTopicBrokersResponse , error )
2023-09-26 22:17:33 +00:00
ConfigureTopic ( context . Context , * ConfigureTopicRequest ) ( * ConfigureTopicResponse , error )
2023-09-25 04:19:51 +00:00
ListTopics ( context . Context , * ListTopicsRequest ) ( * ListTopicsResponse , error )
2023-08-21 05:53:05 +00:00
// 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 )
2022-07-31 20:23:44 +00:00
// data plane
Publish ( SeaweedMessaging_PublishServer ) error
2023-08-27 20:13:14 +00:00
Subscribe ( * SubscribeRequest , SeaweedMessaging_SubscribeServer ) error
2021-12-05 08:42:25 +00:00
mustEmbedUnimplementedSeaweedMessagingServer ( )
}
// UnimplementedSeaweedMessagingServer must be embedded to have forward compatible implementations.
type UnimplementedSeaweedMessagingServer struct {
}
2022-07-10 19:11:37 +00:00
func ( UnimplementedSeaweedMessagingServer ) FindBrokerLeader ( context . Context , * FindBrokerLeaderRequest ) ( * FindBrokerLeaderResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method FindBrokerLeader not implemented" )
2021-12-05 08:42:25 +00:00
}
2022-07-11 07:20:27 +00:00
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" )
}
2023-10-13 03:28:11 +00:00
func ( UnimplementedSeaweedMessagingServer ) ConnectToBalancer ( SeaweedMessaging_ConnectToBalancerServer ) error {
return status . Errorf ( codes . Unimplemented , "method ConnectToBalancer not implemented" )
2023-09-15 06:49:05 +00:00
}
2023-10-01 04:47:57 +00:00
func ( UnimplementedSeaweedMessagingServer ) DoConfigureTopic ( context . Context , * DoConfigureTopicRequest ) ( * DoConfigureTopicResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method DoConfigureTopic not implemented" )
}
2023-08-28 01:59:04 +00:00
func ( UnimplementedSeaweedMessagingServer ) LookupTopicBrokers ( context . Context , * LookupTopicBrokersRequest ) ( * LookupTopicBrokersResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method LookupTopicBrokers not implemented" )
2023-08-21 05:53:05 +00:00
}
2023-09-26 22:17:33 +00:00
func ( UnimplementedSeaweedMessagingServer ) ConfigureTopic ( context . Context , * ConfigureTopicRequest ) ( * ConfigureTopicResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method ConfigureTopic not implemented" )
2023-09-24 21:22:11 +00:00
}
2023-09-25 04:19:51 +00:00
func ( UnimplementedSeaweedMessagingServer ) ListTopics ( context . Context , * ListTopicsRequest ) ( * ListTopicsResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method ListTopics not implemented" )
}
2023-08-21 05:53:05 +00:00
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" )
}
2022-07-31 20:23:44 +00:00
func ( UnimplementedSeaweedMessagingServer ) Publish ( SeaweedMessaging_PublishServer ) error {
return status . Errorf ( codes . Unimplemented , "method Publish not implemented" )
}
2023-08-27 20:13:14 +00:00
func ( UnimplementedSeaweedMessagingServer ) Subscribe ( * SubscribeRequest , SeaweedMessaging_SubscribeServer ) error {
2023-08-26 20:39:21 +00:00
return status . Errorf ( codes . Unimplemented , "method Subscribe not implemented" )
}
2021-12-05 08:42:25 +00:00
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 )
}
2022-07-10 19:11:37 +00:00
func _SeaweedMessaging_FindBrokerLeader_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( FindBrokerLeaderRequest )
2021-12-05 08:42:25 +00:00
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
2022-07-10 19:11:37 +00:00
return srv . ( SeaweedMessagingServer ) . FindBrokerLeader ( ctx , in )
2021-12-05 08:42:25 +00:00
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2023-06-20 01:19:13 +00:00
FullMethod : "/messaging_pb.SeaweedMessaging/FindBrokerLeader" ,
2021-12-05 08:42:25 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2022-07-10 19:11:37 +00:00
return srv . ( SeaweedMessagingServer ) . FindBrokerLeader ( ctx , req . ( * FindBrokerLeaderRequest ) )
2021-12-05 08:42:25 +00:00
}
return interceptor ( ctx , in , info , handler )
}
2022-07-11 07:20:27 +00:00
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 ,
2023-06-20 01:19:13 +00:00
FullMethod : "/messaging_pb.SeaweedMessaging/AssignSegmentBrokers" ,
2022-07-11 07:20:27 +00:00
}
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 ,
2023-06-20 01:19:13 +00:00
FullMethod : "/messaging_pb.SeaweedMessaging/CheckSegmentStatus" ,
2022-07-11 07:20:27 +00:00
}
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 ,
2023-06-20 01:19:13 +00:00
FullMethod : "/messaging_pb.SeaweedMessaging/CheckBrokerLoad" ,
2022-07-11 07:20:27 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( SeaweedMessagingServer ) . CheckBrokerLoad ( ctx , req . ( * CheckBrokerLoadRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2023-10-13 03:28:11 +00:00
func _SeaweedMessaging_ConnectToBalancer_Handler ( srv interface { } , stream grpc . ServerStream ) error {
return srv . ( SeaweedMessagingServer ) . ConnectToBalancer ( & seaweedMessagingConnectToBalancerServer { stream } )
2023-09-15 06:49:05 +00:00
}
2023-10-13 03:28:11 +00:00
type SeaweedMessaging_ConnectToBalancerServer interface {
Send ( * ConnectToBalancerResponse ) error
Recv ( ) ( * ConnectToBalancerRequest , error )
2023-09-15 06:49:05 +00:00
grpc . ServerStream
}
2023-10-13 03:28:11 +00:00
type seaweedMessagingConnectToBalancerServer struct {
2023-09-15 06:49:05 +00:00
grpc . ServerStream
}
2023-10-13 03:28:11 +00:00
func ( x * seaweedMessagingConnectToBalancerServer ) Send ( m * ConnectToBalancerResponse ) error {
2023-09-15 06:49:05 +00:00
return x . ServerStream . SendMsg ( m )
}
2023-10-13 03:28:11 +00:00
func ( x * seaweedMessagingConnectToBalancerServer ) Recv ( ) ( * ConnectToBalancerRequest , error ) {
m := new ( ConnectToBalancerRequest )
2023-09-15 06:49:05 +00:00
if err := x . ServerStream . RecvMsg ( m ) ; err != nil {
return nil , err
}
return m , nil
}
2023-10-01 04:47:57 +00:00
func _SeaweedMessaging_DoConfigureTopic_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( DoConfigureTopicRequest )
2023-08-21 05:53:05 +00:00
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
2023-10-01 04:47:57 +00:00
return srv . ( SeaweedMessagingServer ) . DoConfigureTopic ( ctx , in )
2023-08-21 05:53:05 +00:00
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2023-10-01 04:47:57 +00:00
FullMethod : "/messaging_pb.SeaweedMessaging/DoConfigureTopic" ,
2023-08-21 05:53:05 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2023-10-01 04:47:57 +00:00
return srv . ( SeaweedMessagingServer ) . DoConfigureTopic ( ctx , req . ( * DoConfigureTopicRequest ) )
2023-08-21 05:53:05 +00:00
}
return interceptor ( ctx , in , info , handler )
}
2023-10-01 04:47:57 +00:00
func _SeaweedMessaging_LookupTopicBrokers_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( LookupTopicBrokersRequest )
2023-09-24 21:22:11 +00:00
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
2023-10-01 04:47:57 +00:00
return srv . ( SeaweedMessagingServer ) . LookupTopicBrokers ( ctx , in )
2023-09-24 21:22:11 +00:00
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2023-10-01 04:47:57 +00:00
FullMethod : "/messaging_pb.SeaweedMessaging/LookupTopicBrokers" ,
2023-09-24 21:22:11 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2023-10-01 04:47:57 +00:00
return srv . ( SeaweedMessagingServer ) . LookupTopicBrokers ( ctx , req . ( * LookupTopicBrokersRequest ) )
2023-09-24 21:22:11 +00:00
}
return interceptor ( ctx , in , info , handler )
}
2023-10-01 04:47:57 +00:00
func _SeaweedMessaging_ConfigureTopic_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( ConfigureTopicRequest )
2023-09-24 22:26:49 +00:00
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
2023-10-01 04:47:57 +00:00
return srv . ( SeaweedMessagingServer ) . ConfigureTopic ( ctx , in )
2023-09-24 22:26:49 +00:00
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2023-10-01 04:47:57 +00:00
FullMethod : "/messaging_pb.SeaweedMessaging/ConfigureTopic" ,
2023-09-24 22:26:49 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2023-10-01 04:47:57 +00:00
return srv . ( SeaweedMessagingServer ) . ConfigureTopic ( ctx , req . ( * ConfigureTopicRequest ) )
2023-09-24 22:26:49 +00:00
}
return interceptor ( ctx , in , info , handler )
}
2023-09-25 04:19:51 +00:00
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 )
}
2023-08-21 05:53:05 +00:00
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 )
}
2022-07-31 20:23:44 +00:00
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
}
2023-08-26 20:39:21 +00:00
func _SeaweedMessaging_Subscribe_Handler ( srv interface { } , stream grpc . ServerStream ) error {
2023-08-27 20:13:14 +00:00
m := new ( SubscribeRequest )
if err := stream . RecvMsg ( m ) ; err != nil {
return err
}
return srv . ( SeaweedMessagingServer ) . Subscribe ( m , & seaweedMessagingSubscribeServer { stream } )
2023-08-26 20:39:21 +00:00
}
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 )
}
2021-12-05 08:42:25 +00:00
// 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 {
2022-07-03 07:29:25 +00:00
ServiceName : "messaging_pb.SeaweedMessaging" ,
2021-12-05 08:42:25 +00:00
HandlerType : ( * SeaweedMessagingServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
{
2022-07-10 19:11:37 +00:00
MethodName : "FindBrokerLeader" ,
Handler : _SeaweedMessaging_FindBrokerLeader_Handler ,
2021-12-05 08:42:25 +00:00
} ,
2022-07-11 07:20:27 +00:00
{
MethodName : "AssignSegmentBrokers" ,
Handler : _SeaweedMessaging_AssignSegmentBrokers_Handler ,
} ,
{
MethodName : "CheckSegmentStatus" ,
Handler : _SeaweedMessaging_CheckSegmentStatus_Handler ,
} ,
{
MethodName : "CheckBrokerLoad" ,
Handler : _SeaweedMessaging_CheckBrokerLoad_Handler ,
} ,
2023-10-01 04:47:57 +00:00
{
MethodName : "DoConfigureTopic" ,
Handler : _SeaweedMessaging_DoConfigureTopic_Handler ,
} ,
2023-08-21 05:53:05 +00:00
{
2023-08-28 01:59:04 +00:00
MethodName : "LookupTopicBrokers" ,
Handler : _SeaweedMessaging_LookupTopicBrokers_Handler ,
2023-08-21 05:53:05 +00:00
} ,
2023-09-24 21:22:11 +00:00
{
2023-09-26 22:17:33 +00:00
MethodName : "ConfigureTopic" ,
Handler : _SeaweedMessaging_ConfigureTopic_Handler ,
2023-09-24 21:22:11 +00:00
} ,
2023-09-25 04:19:51 +00:00
{
MethodName : "ListTopics" ,
Handler : _SeaweedMessaging_ListTopics_Handler ,
} ,
2023-08-21 05:53:05 +00:00
{
MethodName : "RequestTopicPartitions" ,
Handler : _SeaweedMessaging_RequestTopicPartitions_Handler ,
} ,
{
MethodName : "AssignTopicPartitions" ,
Handler : _SeaweedMessaging_AssignTopicPartitions_Handler ,
} ,
{
MethodName : "CheckTopicPartitionsStatus" ,
Handler : _SeaweedMessaging_CheckTopicPartitionsStatus_Handler ,
} ,
2021-12-05 08:42:25 +00:00
} ,
2022-07-31 20:23:44 +00:00
Streams : [ ] grpc . StreamDesc {
2023-09-15 06:49:05 +00:00
{
2023-10-13 03:28:11 +00:00
StreamName : "ConnectToBalancer" ,
Handler : _SeaweedMessaging_ConnectToBalancer_Handler ,
2023-09-15 06:49:05 +00:00
ServerStreams : true ,
ClientStreams : true ,
} ,
2022-07-31 20:23:44 +00:00
{
StreamName : "Publish" ,
Handler : _SeaweedMessaging_Publish_Handler ,
ServerStreams : true ,
ClientStreams : true ,
} ,
2023-08-26 20:39:21 +00:00
{
StreamName : "Subscribe" ,
Handler : _SeaweedMessaging_Subscribe_Handler ,
ServerStreams : true ,
} ,
2022-07-31 20:23:44 +00:00
} ,
2022-07-02 05:43:25 +00:00
Metadata : "mq.proto" ,
2021-12-05 08:42:25 +00:00
}