github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/engine/enginepb/test_grpc.pb.go (about)

     1  // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
     2  
     3  package enginepb
     4  
     5  import (
     6  	context "context"
     7  	grpc "google.golang.org/grpc"
     8  	codes "google.golang.org/grpc/codes"
     9  	status "google.golang.org/grpc/status"
    10  )
    11  
    12  // This is a compile-time assertion to ensure that this generated file
    13  // is compatible with the grpc package it is being compiled against.
    14  // Requires gRPC-Go v1.32.0 or later.
    15  const _ = grpc.SupportPackageIsVersion7
    16  
    17  // TestServiceClient is the client API for TestService service.
    18  //
    19  // 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.
    20  type TestServiceClient interface {
    21  	FeedBinlog(ctx context.Context, in *TestBinlogRequest, opts ...grpc.CallOption) (TestService_FeedBinlogClient, error)
    22  }
    23  
    24  type testServiceClient struct {
    25  	cc grpc.ClientConnInterface
    26  }
    27  
    28  func NewTestServiceClient(cc grpc.ClientConnInterface) TestServiceClient {
    29  	return &testServiceClient{cc}
    30  }
    31  
    32  func (c *testServiceClient) FeedBinlog(ctx context.Context, in *TestBinlogRequest, opts ...grpc.CallOption) (TestService_FeedBinlogClient, error) {
    33  	stream, err := c.cc.NewStream(ctx, &TestService_ServiceDesc.Streams[0], "/enginepb.TestService/FeedBinlog", opts...)
    34  	if err != nil {
    35  		return nil, err
    36  	}
    37  	x := &testServiceFeedBinlogClient{stream}
    38  	if err := x.ClientStream.SendMsg(in); err != nil {
    39  		return nil, err
    40  	}
    41  	if err := x.ClientStream.CloseSend(); err != nil {
    42  		return nil, err
    43  	}
    44  	return x, nil
    45  }
    46  
    47  type TestService_FeedBinlogClient interface {
    48  	Recv() (*Record, error)
    49  	grpc.ClientStream
    50  }
    51  
    52  type testServiceFeedBinlogClient struct {
    53  	grpc.ClientStream
    54  }
    55  
    56  func (x *testServiceFeedBinlogClient) Recv() (*Record, error) {
    57  	m := new(Record)
    58  	if err := x.ClientStream.RecvMsg(m); err != nil {
    59  		return nil, err
    60  	}
    61  	return m, nil
    62  }
    63  
    64  // TestServiceServer is the server API for TestService service.
    65  // All implementations should embed UnimplementedTestServiceServer
    66  // for forward compatibility
    67  type TestServiceServer interface {
    68  	FeedBinlog(*TestBinlogRequest, TestService_FeedBinlogServer) error
    69  }
    70  
    71  // UnimplementedTestServiceServer should be embedded to have forward compatible implementations.
    72  type UnimplementedTestServiceServer struct {
    73  }
    74  
    75  func (UnimplementedTestServiceServer) FeedBinlog(*TestBinlogRequest, TestService_FeedBinlogServer) error {
    76  	return status.Errorf(codes.Unimplemented, "method FeedBinlog not implemented")
    77  }
    78  
    79  // UnsafeTestServiceServer may be embedded to opt out of forward compatibility for this service.
    80  // Use of this interface is not recommended, as added methods to TestServiceServer will
    81  // result in compilation errors.
    82  type UnsafeTestServiceServer interface {
    83  	mustEmbedUnimplementedTestServiceServer()
    84  }
    85  
    86  func RegisterTestServiceServer(s grpc.ServiceRegistrar, srv TestServiceServer) {
    87  	s.RegisterService(&TestService_ServiceDesc, srv)
    88  }
    89  
    90  func _TestService_FeedBinlog_Handler(srv interface{}, stream grpc.ServerStream) error {
    91  	m := new(TestBinlogRequest)
    92  	if err := stream.RecvMsg(m); err != nil {
    93  		return err
    94  	}
    95  	return srv.(TestServiceServer).FeedBinlog(m, &testServiceFeedBinlogServer{stream})
    96  }
    97  
    98  type TestService_FeedBinlogServer interface {
    99  	Send(*Record) error
   100  	grpc.ServerStream
   101  }
   102  
   103  type testServiceFeedBinlogServer struct {
   104  	grpc.ServerStream
   105  }
   106  
   107  func (x *testServiceFeedBinlogServer) Send(m *Record) error {
   108  	return x.ServerStream.SendMsg(m)
   109  }
   110  
   111  // TestService_ServiceDesc is the grpc.ServiceDesc for TestService service.
   112  // It's only intended for direct use with grpc.RegisterService,
   113  // and not to be introspected or modified (even as a copy)
   114  var TestService_ServiceDesc = grpc.ServiceDesc{
   115  	ServiceName: "enginepb.TestService",
   116  	HandlerType: (*TestServiceServer)(nil),
   117  	Methods:     []grpc.MethodDesc{},
   118  	Streams: []grpc.StreamDesc{
   119  		{
   120  			StreamName:    "FeedBinlog",
   121  			Handler:       _TestService_FeedBinlog_Handler,
   122  			ServerStreams: true,
   123  		},
   124  	},
   125  	Metadata: "engine/proto/test.proto",
   126  }