github.com/eth-easl/loader@v0.0.0-20230908084258-8a37e1d94279/server/trace-func-py/faas_pb2_grpc.py (about) 1 # MIT License 2 # 3 # Copyright (c) 2023 EASL and the vHive community 4 # 5 # Permission is hereby granted, free of charge, to any person obtaining a copy 6 # of this software and associated documentation files (the "Software"), to deal 7 # in the Software without restriction, including without limitation the rights 8 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 # copies of the Software, and to permit persons to whom the Software is 10 # furnished to do so, subject to the following conditions: 11 # 12 # The above copyright notice and this permission notice shall be included in all 13 # copies or substantial portions of the Software. 14 # 15 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 # SOFTWARE. 22 23 # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! 24 """Client and server classes corresponding to protobuf-defined services.""" 25 import grpc 26 27 import faas_pb2 as faas__pb2 28 29 30 class ExecutorStub(object): 31 """The function service definition. 32 """ 33 34 def __init__(self, channel): 35 """Constructor. 36 37 Args: 38 channel: A grpc.Channel. 39 """ 40 self.Execute = channel.unary_unary( 41 '/faasfunction.Executor/Execute', 42 request_serializer=faas__pb2.FaasRequest.SerializeToString, 43 response_deserializer=faas__pb2.FaasReply.FromString, 44 ) 45 46 47 class ExecutorServicer(object): 48 """The function service definition. 49 """ 50 51 def Execute(self, request, context): 52 """Executes the function 53 """ 54 context.set_code(grpc.StatusCode.UNIMPLEMENTED) 55 context.set_details('Method not implemented!') 56 raise NotImplementedError('Method not implemented!') 57 58 59 def add_ExecutorServicer_to_server(servicer, server): 60 rpc_method_handlers = { 61 'Execute': grpc.unary_unary_rpc_method_handler( 62 servicer.Execute, 63 request_deserializer=faas__pb2.FaasRequest.FromString, 64 response_serializer=faas__pb2.FaasReply.SerializeToString, 65 ), 66 } 67 generic_handler = grpc.method_handlers_generic_handler( 68 'faasfunction.Executor', rpc_method_handlers) 69 server.add_generic_rpc_handlers((generic_handler,)) 70 71 72 # This class is part of an EXPERIMENTAL API. 73 class Executor(object): 74 """The function service definition. 75 """ 76 77 @staticmethod 78 def Execute(request, 79 target, 80 options=(), 81 channel_credentials=None, 82 call_credentials=None, 83 insecure=False, 84 compression=None, 85 wait_for_ready=None, 86 timeout=None, 87 metadata=None): 88 return grpc.experimental.unary_unary(request, target, '/faasfunction.Executor/Execute', 89 faas__pb2.FaasRequest.SerializeToString, 90 faas__pb2.FaasReply.FromString, 91 options, channel_credentials, 92 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)