github.com/matrixorigin/matrixone@v1.2.0/pkg/udf/pythonservice/pyserver/udf_pb2_grpc.py (about) 1 # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! 2 """Client and server classes corresponding to protobuf-defined services.""" 3 import grpc 4 5 import udf_pb2 as udf__pb2 6 7 8 class ServiceStub(object): 9 """protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative ./udf.proto 10 11 """ 12 13 def __init__(self, channel): 14 """Constructor. 15 16 Args: 17 channel: A grpc.Channel. 18 """ 19 self.run = channel.stream_stream( 20 '/udf.Service/run', 21 request_serializer=udf__pb2.Request.SerializeToString, 22 response_deserializer=udf__pb2.Response.FromString, 23 ) 24 25 26 class ServiceServicer(object): 27 """protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative ./udf.proto 28 29 """ 30 31 def run(self, request_iterator, context): 32 """Missing associated documentation comment in .proto file.""" 33 context.set_code(grpc.StatusCode.UNIMPLEMENTED) 34 context.set_details('Method not implemented!') 35 raise NotImplementedError('Method not implemented!') 36 37 38 def add_ServiceServicer_to_server(servicer, server): 39 rpc_method_handlers = { 40 'run': grpc.stream_stream_rpc_method_handler( 41 servicer.run, 42 request_deserializer=udf__pb2.Request.FromString, 43 response_serializer=udf__pb2.Response.SerializeToString, 44 ), 45 } 46 generic_handler = grpc.method_handlers_generic_handler( 47 'udf.Service', rpc_method_handlers) 48 server.add_generic_rpc_handlers((generic_handler,)) 49 50 51 # This class is part of an EXPERIMENTAL API. 52 class Service(object): 53 """protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative ./udf.proto 54 55 """ 56 57 @staticmethod 58 def run(request_iterator, 59 target, 60 options=(), 61 channel_credentials=None, 62 call_credentials=None, 63 insecure=False, 64 compression=None, 65 wait_for_ready=None, 66 timeout=None, 67 metadata=None): 68 return grpc.experimental.stream_stream(request_iterator, target, '/udf.Service/run', 69 udf__pb2.Request.SerializeToString, 70 udf__pb2.Response.FromString, 71 options, channel_credentials, 72 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)