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