2021-12-05 16:42:25 +08:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
2022-07-02 13:43:25 +08:00
package mq_pb
2021-12-05 16:42:25 +08: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-05-02 12:59:16 +08:00
// Requires gRPC-Go v1.32.0 or later.
2021-12-05 16:42:25 +08: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-11 03:11:37 +08:00
FindBrokerLeader ( ctx context . Context , in * FindBrokerLeaderRequest , opts ... grpc . CallOption ) ( * FindBrokerLeaderResponse , error )
2021-12-05 16:42:25 +08:00
}
type seaweedMessagingClient struct {
cc grpc . ClientConnInterface
}
func NewSeaweedMessagingClient ( cc grpc . ClientConnInterface ) SeaweedMessagingClient {
return & seaweedMessagingClient { cc }
}
2022-07-11 03:11:37 +08:00
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 ... )
2021-12-05 16:42:25 +08:00
if err != nil {
return nil , err
}
return out , nil
}
// SeaweedMessagingServer is the server API for SeaweedMessaging service.
// All implementations must embed UnimplementedSeaweedMessagingServer
// for forward compatibility
type SeaweedMessagingServer interface {
2022-07-11 03:11:37 +08:00
FindBrokerLeader ( context . Context , * FindBrokerLeaderRequest ) ( * FindBrokerLeaderResponse , error )
2021-12-05 16:42:25 +08:00
mustEmbedUnimplementedSeaweedMessagingServer ( )
}
// UnimplementedSeaweedMessagingServer must be embedded to have forward compatible implementations.
type UnimplementedSeaweedMessagingServer struct {
}
2022-07-11 03:11:37 +08:00
func ( UnimplementedSeaweedMessagingServer ) FindBrokerLeader ( context . Context , * FindBrokerLeaderRequest ) ( * FindBrokerLeaderResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method FindBrokerLeader not implemented" )
2021-12-05 16:42:25 +08: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-11 03:11:37 +08: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 16:42:25 +08:00
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
2022-07-11 03:11:37 +08:00
return srv . ( SeaweedMessagingServer ) . FindBrokerLeader ( ctx , in )
2021-12-05 16:42:25 +08:00
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2022-07-11 03:11:37 +08:00
FullMethod : "/messaging_pb.SeaweedMessaging/FindBrokerLeader" ,
2021-12-05 16:42:25 +08:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2022-07-11 03:11:37 +08:00
return srv . ( SeaweedMessagingServer ) . FindBrokerLeader ( ctx , req . ( * FindBrokerLeaderRequest ) )
2021-12-05 16:42:25 +08:00
}
return interceptor ( ctx , in , info , handler )
}
// 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 15:29:25 +08:00
ServiceName : "messaging_pb.SeaweedMessaging" ,
2021-12-05 16:42:25 +08:00
HandlerType : ( * SeaweedMessagingServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
{
2022-07-11 03:11:37 +08:00
MethodName : "FindBrokerLeader" ,
Handler : _SeaweedMessaging_FindBrokerLeader_Handler ,
2021-12-05 16:42:25 +08:00
} ,
} ,
2022-07-10 16:36:23 +08:00
Streams : [ ] grpc . StreamDesc { } ,
2022-07-02 13:43:25 +08:00
Metadata : "mq.proto" ,
2021-12-05 16:42:25 +08:00
}