github.com/0xPolygon/supernets2-node@v0.0.0-20230711153321-2fe574524eaa/state/runtime/executor/pb/executor_grpc.pb.go (about) 1 // Code generated by protoc-gen-go-grpc. DO NOT EDIT. 2 // versions: 3 // - protoc-gen-go-grpc v1.3.0 4 // - protoc v3.12.4 5 // source: executor.proto 6 7 package pb 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 const ( 22 ExecutorService_ProcessBatch_FullMethodName = "/executor.v1.ExecutorService/ProcessBatch" 23 ) 24 25 // ExecutorServiceClient is the client API for ExecutorService service. 26 // 27 // 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. 28 type ExecutorServiceClient interface { 29 // / Processes a batch 30 ProcessBatch(ctx context.Context, in *ProcessBatchRequest, opts ...grpc.CallOption) (*ProcessBatchResponse, error) 31 } 32 33 type executorServiceClient struct { 34 cc grpc.ClientConnInterface 35 } 36 37 func NewExecutorServiceClient(cc grpc.ClientConnInterface) ExecutorServiceClient { 38 return &executorServiceClient{cc} 39 } 40 41 func (c *executorServiceClient) ProcessBatch(ctx context.Context, in *ProcessBatchRequest, opts ...grpc.CallOption) (*ProcessBatchResponse, error) { 42 out := new(ProcessBatchResponse) 43 err := c.cc.Invoke(ctx, ExecutorService_ProcessBatch_FullMethodName, in, out, opts...) 44 if err != nil { 45 return nil, err 46 } 47 return out, nil 48 } 49 50 // ExecutorServiceServer is the server API for ExecutorService service. 51 // All implementations must embed UnimplementedExecutorServiceServer 52 // for forward compatibility 53 type ExecutorServiceServer interface { 54 // / Processes a batch 55 ProcessBatch(context.Context, *ProcessBatchRequest) (*ProcessBatchResponse, error) 56 mustEmbedUnimplementedExecutorServiceServer() 57 } 58 59 // UnimplementedExecutorServiceServer must be embedded to have forward compatible implementations. 60 type UnimplementedExecutorServiceServer struct { 61 } 62 63 func (UnimplementedExecutorServiceServer) ProcessBatch(context.Context, *ProcessBatchRequest) (*ProcessBatchResponse, error) { 64 return nil, status.Errorf(codes.Unimplemented, "method ProcessBatch not implemented") 65 } 66 func (UnimplementedExecutorServiceServer) mustEmbedUnimplementedExecutorServiceServer() {} 67 68 // UnsafeExecutorServiceServer may be embedded to opt out of forward compatibility for this service. 69 // Use of this interface is not recommended, as added methods to ExecutorServiceServer will 70 // result in compilation errors. 71 type UnsafeExecutorServiceServer interface { 72 mustEmbedUnimplementedExecutorServiceServer() 73 } 74 75 func RegisterExecutorServiceServer(s grpc.ServiceRegistrar, srv ExecutorServiceServer) { 76 s.RegisterService(&ExecutorService_ServiceDesc, srv) 77 } 78 79 func _ExecutorService_ProcessBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 80 in := new(ProcessBatchRequest) 81 if err := dec(in); err != nil { 82 return nil, err 83 } 84 if interceptor == nil { 85 return srv.(ExecutorServiceServer).ProcessBatch(ctx, in) 86 } 87 info := &grpc.UnaryServerInfo{ 88 Server: srv, 89 FullMethod: ExecutorService_ProcessBatch_FullMethodName, 90 } 91 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 92 return srv.(ExecutorServiceServer).ProcessBatch(ctx, req.(*ProcessBatchRequest)) 93 } 94 return interceptor(ctx, in, info, handler) 95 } 96 97 // ExecutorService_ServiceDesc is the grpc.ServiceDesc for ExecutorService service. 98 // It's only intended for direct use with grpc.RegisterService, 99 // and not to be introspected or modified (even as a copy) 100 var ExecutorService_ServiceDesc = grpc.ServiceDesc{ 101 ServiceName: "executor.v1.ExecutorService", 102 HandlerType: (*ExecutorServiceServer)(nil), 103 Methods: []grpc.MethodDesc{ 104 { 105 MethodName: "ProcessBatch", 106 Handler: _ExecutorService_ProcessBatch_Handler, 107 }, 108 }, 109 Streams: []grpc.StreamDesc{}, 110 Metadata: "executor.proto", 111 }