github.com/eth-easl/loader@v0.0.0-20230908084258-8a37e1d94279/pkg/workload/proto/faas_grpc.pb.go (about)

     1  // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
     2  
     3  package proto
     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  // ExecutorClient is the client API for Executor 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 ExecutorClient interface {
    21  	// Remote execution via RPC call.
    22  	Execute(ctx context.Context, in *FaasRequest, opts ...grpc.CallOption) (*FaasReply, error)
    23  }
    24  
    25  type executorClient struct {
    26  	cc grpc.ClientConnInterface
    27  }
    28  
    29  func NewExecutorClient(cc grpc.ClientConnInterface) ExecutorClient {
    30  	return &executorClient{cc}
    31  }
    32  
    33  func (c *executorClient) Execute(ctx context.Context, in *FaasRequest, opts ...grpc.CallOption) (*FaasReply, error) {
    34  	out := new(FaasReply)
    35  	err := c.cc.Invoke(ctx, "/faas.Executor/Execute", in, out, opts...)
    36  	if err != nil {
    37  		return nil, err
    38  	}
    39  	return out, nil
    40  }
    41  
    42  // ExecutorServer is the server API for Executor service.
    43  // All implementations must embed UnimplementedExecutorServer
    44  // for forward compatibility
    45  type ExecutorServer interface {
    46  	// Remote execution via RPC call.
    47  	Execute(context.Context, *FaasRequest) (*FaasReply, error)
    48  	mustEmbedUnimplementedExecutorServer()
    49  }
    50  
    51  // UnimplementedExecutorServer must be embedded to have forward compatible implementations.
    52  type UnimplementedExecutorServer struct {
    53  }
    54  
    55  func (UnimplementedExecutorServer) Execute(context.Context, *FaasRequest) (*FaasReply, error) {
    56  	return nil, status.Errorf(codes.Unimplemented, "method Execute not implemented")
    57  }
    58  func (UnimplementedExecutorServer) mustEmbedUnimplementedExecutorServer() {}
    59  
    60  // UnsafeExecutorServer may be embedded to opt out of forward compatibility for this service.
    61  // Use of this interface is not recommended, as added methods to ExecutorServer will
    62  // result in compilation errors.
    63  type UnsafeExecutorServer interface {
    64  	mustEmbedUnimplementedExecutorServer()
    65  }
    66  
    67  func RegisterExecutorServer(s grpc.ServiceRegistrar, srv ExecutorServer) {
    68  	s.RegisterService(&Executor_ServiceDesc, srv)
    69  }
    70  
    71  func _Executor_Execute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
    72  	in := new(FaasRequest)
    73  	if err := dec(in); err != nil {
    74  		return nil, err
    75  	}
    76  	if interceptor == nil {
    77  		return srv.(ExecutorServer).Execute(ctx, in)
    78  	}
    79  	info := &grpc.UnaryServerInfo{
    80  		Server:     srv,
    81  		FullMethod: "/faas.Executor/Execute",
    82  	}
    83  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
    84  		return srv.(ExecutorServer).Execute(ctx, req.(*FaasRequest))
    85  	}
    86  	return interceptor(ctx, in, info, handler)
    87  }
    88  
    89  // Executor_ServiceDesc is the grpc.ServiceDesc for Executor service.
    90  // It's only intended for direct use with grpc.RegisterService,
    91  // and not to be introspected or modified (even as a copy)
    92  var Executor_ServiceDesc = grpc.ServiceDesc{
    93  	ServiceName: "faas.Executor",
    94  	HandlerType: (*ExecutorServer)(nil),
    95  	Methods: []grpc.MethodDesc{
    96  		{
    97  			MethodName: "Execute",
    98  			Handler:    _Executor_Execute_Handler,
    99  		},
   100  	},
   101  	Streams:  []grpc.StreamDesc{},
   102  	Metadata: "server/faas.proto",
   103  }