github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/engine/enginepb/executor_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 // ExecutorServiceClient is the client API for ExecutorService 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 ExecutorServiceClient interface { 21 PreDispatchTask(ctx context.Context, in *PreDispatchTaskRequest, opts ...grpc.CallOption) (*PreDispatchTaskResponse, error) 22 ConfirmDispatchTask(ctx context.Context, in *ConfirmDispatchTaskRequest, opts ...grpc.CallOption) (*ConfirmDispatchTaskResponse, error) 23 } 24 25 type executorServiceClient struct { 26 cc grpc.ClientConnInterface 27 } 28 29 func NewExecutorServiceClient(cc grpc.ClientConnInterface) ExecutorServiceClient { 30 return &executorServiceClient{cc} 31 } 32 33 func (c *executorServiceClient) PreDispatchTask(ctx context.Context, in *PreDispatchTaskRequest, opts ...grpc.CallOption) (*PreDispatchTaskResponse, error) { 34 out := new(PreDispatchTaskResponse) 35 err := c.cc.Invoke(ctx, "/enginepb.ExecutorService/PreDispatchTask", in, out, opts...) 36 if err != nil { 37 return nil, err 38 } 39 return out, nil 40 } 41 42 func (c *executorServiceClient) ConfirmDispatchTask(ctx context.Context, in *ConfirmDispatchTaskRequest, opts ...grpc.CallOption) (*ConfirmDispatchTaskResponse, error) { 43 out := new(ConfirmDispatchTaskResponse) 44 err := c.cc.Invoke(ctx, "/enginepb.ExecutorService/ConfirmDispatchTask", in, out, opts...) 45 if err != nil { 46 return nil, err 47 } 48 return out, nil 49 } 50 51 // ExecutorServiceServer is the server API for ExecutorService service. 52 // All implementations should embed UnimplementedExecutorServiceServer 53 // for forward compatibility 54 type ExecutorServiceServer interface { 55 PreDispatchTask(context.Context, *PreDispatchTaskRequest) (*PreDispatchTaskResponse, error) 56 ConfirmDispatchTask(context.Context, *ConfirmDispatchTaskRequest) (*ConfirmDispatchTaskResponse, error) 57 } 58 59 // UnimplementedExecutorServiceServer should be embedded to have forward compatible implementations. 60 type UnimplementedExecutorServiceServer struct { 61 } 62 63 func (UnimplementedExecutorServiceServer) PreDispatchTask(context.Context, *PreDispatchTaskRequest) (*PreDispatchTaskResponse, error) { 64 return nil, status.Errorf(codes.Unimplemented, "method PreDispatchTask not implemented") 65 } 66 func (UnimplementedExecutorServiceServer) ConfirmDispatchTask(context.Context, *ConfirmDispatchTaskRequest) (*ConfirmDispatchTaskResponse, error) { 67 return nil, status.Errorf(codes.Unimplemented, "method ConfirmDispatchTask not implemented") 68 } 69 70 // UnsafeExecutorServiceServer may be embedded to opt out of forward compatibility for this service. 71 // Use of this interface is not recommended, as added methods to ExecutorServiceServer will 72 // result in compilation errors. 73 type UnsafeExecutorServiceServer interface { 74 mustEmbedUnimplementedExecutorServiceServer() 75 } 76 77 func RegisterExecutorServiceServer(s grpc.ServiceRegistrar, srv ExecutorServiceServer) { 78 s.RegisterService(&ExecutorService_ServiceDesc, srv) 79 } 80 81 func _ExecutorService_PreDispatchTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 82 in := new(PreDispatchTaskRequest) 83 if err := dec(in); err != nil { 84 return nil, err 85 } 86 if interceptor == nil { 87 return srv.(ExecutorServiceServer).PreDispatchTask(ctx, in) 88 } 89 info := &grpc.UnaryServerInfo{ 90 Server: srv, 91 FullMethod: "/enginepb.ExecutorService/PreDispatchTask", 92 } 93 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 94 return srv.(ExecutorServiceServer).PreDispatchTask(ctx, req.(*PreDispatchTaskRequest)) 95 } 96 return interceptor(ctx, in, info, handler) 97 } 98 99 func _ExecutorService_ConfirmDispatchTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 100 in := new(ConfirmDispatchTaskRequest) 101 if err := dec(in); err != nil { 102 return nil, err 103 } 104 if interceptor == nil { 105 return srv.(ExecutorServiceServer).ConfirmDispatchTask(ctx, in) 106 } 107 info := &grpc.UnaryServerInfo{ 108 Server: srv, 109 FullMethod: "/enginepb.ExecutorService/ConfirmDispatchTask", 110 } 111 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 112 return srv.(ExecutorServiceServer).ConfirmDispatchTask(ctx, req.(*ConfirmDispatchTaskRequest)) 113 } 114 return interceptor(ctx, in, info, handler) 115 } 116 117 // ExecutorService_ServiceDesc is the grpc.ServiceDesc for ExecutorService service. 118 // It's only intended for direct use with grpc.RegisterService, 119 // and not to be introspected or modified (even as a copy) 120 var ExecutorService_ServiceDesc = grpc.ServiceDesc{ 121 ServiceName: "enginepb.ExecutorService", 122 HandlerType: (*ExecutorServiceServer)(nil), 123 Methods: []grpc.MethodDesc{ 124 { 125 MethodName: "PreDispatchTask", 126 Handler: _ExecutorService_PreDispatchTask_Handler, 127 }, 128 { 129 MethodName: "ConfirmDispatchTask", 130 Handler: _ExecutorService_ConfirmDispatchTask_Handler, 131 }, 132 }, 133 Streams: []grpc.StreamDesc{}, 134 Metadata: "engine/proto/executor.proto", 135 } 136 137 // BrokerServiceClient is the client API for BrokerService service. 138 // 139 // 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. 140 type BrokerServiceClient interface { 141 RemoveResource(ctx context.Context, in *RemoveLocalResourceRequest, opts ...grpc.CallOption) (*RemoveLocalResourceResponse, error) 142 } 143 144 type brokerServiceClient struct { 145 cc grpc.ClientConnInterface 146 } 147 148 func NewBrokerServiceClient(cc grpc.ClientConnInterface) BrokerServiceClient { 149 return &brokerServiceClient{cc} 150 } 151 152 func (c *brokerServiceClient) RemoveResource(ctx context.Context, in *RemoveLocalResourceRequest, opts ...grpc.CallOption) (*RemoveLocalResourceResponse, error) { 153 out := new(RemoveLocalResourceResponse) 154 err := c.cc.Invoke(ctx, "/enginepb.BrokerService/RemoveResource", in, out, opts...) 155 if err != nil { 156 return nil, err 157 } 158 return out, nil 159 } 160 161 // BrokerServiceServer is the server API for BrokerService service. 162 // All implementations should embed UnimplementedBrokerServiceServer 163 // for forward compatibility 164 type BrokerServiceServer interface { 165 RemoveResource(context.Context, *RemoveLocalResourceRequest) (*RemoveLocalResourceResponse, error) 166 } 167 168 // UnimplementedBrokerServiceServer should be embedded to have forward compatible implementations. 169 type UnimplementedBrokerServiceServer struct { 170 } 171 172 func (UnimplementedBrokerServiceServer) RemoveResource(context.Context, *RemoveLocalResourceRequest) (*RemoveLocalResourceResponse, error) { 173 return nil, status.Errorf(codes.Unimplemented, "method RemoveResource not implemented") 174 } 175 176 // UnsafeBrokerServiceServer may be embedded to opt out of forward compatibility for this service. 177 // Use of this interface is not recommended, as added methods to BrokerServiceServer will 178 // result in compilation errors. 179 type UnsafeBrokerServiceServer interface { 180 mustEmbedUnimplementedBrokerServiceServer() 181 } 182 183 func RegisterBrokerServiceServer(s grpc.ServiceRegistrar, srv BrokerServiceServer) { 184 s.RegisterService(&BrokerService_ServiceDesc, srv) 185 } 186 187 func _BrokerService_RemoveResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 188 in := new(RemoveLocalResourceRequest) 189 if err := dec(in); err != nil { 190 return nil, err 191 } 192 if interceptor == nil { 193 return srv.(BrokerServiceServer).RemoveResource(ctx, in) 194 } 195 info := &grpc.UnaryServerInfo{ 196 Server: srv, 197 FullMethod: "/enginepb.BrokerService/RemoveResource", 198 } 199 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 200 return srv.(BrokerServiceServer).RemoveResource(ctx, req.(*RemoveLocalResourceRequest)) 201 } 202 return interceptor(ctx, in, info, handler) 203 } 204 205 // BrokerService_ServiceDesc is the grpc.ServiceDesc for BrokerService service. 206 // It's only intended for direct use with grpc.RegisterService, 207 // and not to be introspected or modified (even as a copy) 208 var BrokerService_ServiceDesc = grpc.ServiceDesc{ 209 ServiceName: "enginepb.BrokerService", 210 HandlerType: (*BrokerServiceServer)(nil), 211 Methods: []grpc.MethodDesc{ 212 { 213 MethodName: "RemoveResource", 214 Handler: _BrokerService_RemoveResource_Handler, 215 }, 216 }, 217 Streams: []grpc.StreamDesc{}, 218 Metadata: "engine/proto/executor.proto", 219 }