vitess-gh/py/vtproto/vtworkerservice_pb2_grpc.py

48 строки
1.6 KiB
Python

# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
import vtworkerdata_pb2 as vtworkerdata__pb2
class VtworkerStub(object):
"""Vtworker contains the vtworker RPC calls.
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.ExecuteVtworkerCommand = channel.unary_stream(
'/vtworkerservice.Vtworker/ExecuteVtworkerCommand',
request_serializer=vtworkerdata__pb2.ExecuteVtworkerCommandRequest.SerializeToString,
response_deserializer=vtworkerdata__pb2.ExecuteVtworkerCommandResponse.FromString,
)
class VtworkerServicer(object):
"""Vtworker contains the vtworker RPC calls.
"""
def ExecuteVtworkerCommand(self, request, context):
"""ExecuteVtworkerCommand allows to run a vtworker command by specifying the
same arguments as on the command line.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_VtworkerServicer_to_server(servicer, server):
rpc_method_handlers = {
'ExecuteVtworkerCommand': grpc.unary_stream_rpc_method_handler(
servicer.ExecuteVtworkerCommand,
request_deserializer=vtworkerdata__pb2.ExecuteVtworkerCommandRequest.FromString,
response_serializer=vtworkerdata__pb2.ExecuteVtworkerCommandResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'vtworkerservice.Vtworker', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))