github.com/eth-easl/loader@v0.0.0-20230908084258-8a37e1d94279/pkg/workload/proto/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 from pkg.workload.proto import faas_pb2 as server_dot_faas__pb2 28 29 30 class ExecutorStub(object): 31 """Missing associated documentation comment in .proto file.""" 32 33 def __init__(self, channel): 34 """Constructor. 35 36 Args: 37 channel: A grpc.Channel. 38 """ 39 self.Execute = channel.unary_unary( 40 '/faas.Executor/Execute', 41 request_serializer=server_dot_faas__pb2.FaasRequest.SerializeToString, 42 response_deserializer=server_dot_faas__pb2.FaasReply.FromString, 43 ) 44 45 46 class ExecutorServicer(object): 47 """Missing associated documentation comment in .proto file.""" 48 49 def Execute(self, request, context): 50 """Remote execution via RPC call. 51 """ 52 context.set_code(grpc.StatusCode.UNIMPLEMENTED) 53 context.set_details('Method not implemented!') 54 raise NotImplementedError('Method not implemented!') 55 56 57 def add_ExecutorServicer_to_server(servicer, server): 58 rpc_method_handlers = { 59 'Execute': grpc.unary_unary_rpc_method_handler( 60 servicer.Execute, 61 request_deserializer=server_dot_faas__pb2.FaasRequest.FromString, 62 response_serializer=server_dot_faas__pb2.FaasReply.SerializeToString, 63 ), 64 } 65 generic_handler = grpc.method_handlers_generic_handler( 66 'faas.Executor', rpc_method_handlers) 67 server.add_generic_rpc_handlers((generic_handler,)) 68 69 70 # This class is part of an EXPERIMENTAL API. 71 class Executor(object): 72 """Missing associated documentation comment in .proto file.""" 73 74 @staticmethod 75 def Execute(request, 76 target, 77 options=(), 78 channel_credentials=None, 79 call_credentials=None, 80 insecure=False, 81 compression=None, 82 wait_for_ready=None, 83 timeout=None, 84 metadata=None): 85 return grpc.experimental.unary_unary(request, target, '/faas.Executor/Execute', 86 server_dot_faas__pb2.FaasRequest.SerializeToString, 87 server_dot_faas__pb2.FaasReply.FromString, 88 options, channel_credentials, 89 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)