156 lines
5.6 KiB
Python
Executable file
156 lines
5.6 KiB
Python
Executable file
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
import grpc
|
|
|
|
from proto import task_pb2 as proto_dot_task__pb2
|
|
|
|
|
|
class TaskServerStub(object):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
|
|
def __init__(self, channel):
|
|
"""Constructor.
|
|
|
|
Args:
|
|
channel: A grpc.Channel.
|
|
"""
|
|
self.GetObject = channel.unary_unary(
|
|
'/TaskServer/GetObject',
|
|
request_serializer=proto_dot_task__pb2.GetRequest.SerializeToString,
|
|
response_deserializer=proto_dot_task__pb2.GetResponse.FromString,
|
|
)
|
|
self.PutObject = channel.unary_unary(
|
|
'/TaskServer/PutObject',
|
|
request_serializer=proto_dot_task__pb2.PutRequest.SerializeToString,
|
|
response_deserializer=proto_dot_task__pb2.PutResponse.FromString,
|
|
)
|
|
self.Schedule = channel.unary_unary(
|
|
'/TaskServer/Schedule',
|
|
request_serializer=proto_dot_task__pb2.Task.SerializeToString,
|
|
response_deserializer=proto_dot_task__pb2.TaskTicket.FromString,
|
|
)
|
|
|
|
|
|
class TaskServerServicer(object):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
|
|
def GetObject(self, request, context):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
context.set_details('Method not implemented!')
|
|
raise NotImplementedError('Method not implemented!')
|
|
|
|
def PutObject(self, request, context):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
context.set_details('Method not implemented!')
|
|
raise NotImplementedError('Method not implemented!')
|
|
|
|
def Schedule(self, request, context):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
context.set_details('Method not implemented!')
|
|
raise NotImplementedError('Method not implemented!')
|
|
|
|
|
|
def add_TaskServerServicer_to_server(servicer, server):
|
|
rpc_method_handlers = {
|
|
'GetObject': grpc.unary_unary_rpc_method_handler(
|
|
servicer.GetObject,
|
|
request_deserializer=proto_dot_task__pb2.GetRequest.FromString,
|
|
response_serializer=proto_dot_task__pb2.GetResponse.SerializeToString,
|
|
),
|
|
'PutObject': grpc.unary_unary_rpc_method_handler(
|
|
servicer.PutObject,
|
|
request_deserializer=proto_dot_task__pb2.PutRequest.FromString,
|
|
response_serializer=proto_dot_task__pb2.PutResponse.SerializeToString,
|
|
),
|
|
'Schedule': grpc.unary_unary_rpc_method_handler(
|
|
servicer.Schedule,
|
|
request_deserializer=proto_dot_task__pb2.Task.FromString,
|
|
response_serializer=proto_dot_task__pb2.TaskTicket.SerializeToString,
|
|
),
|
|
}
|
|
generic_handler = grpc.method_handlers_generic_handler(
|
|
'TaskServer', rpc_method_handlers)
|
|
server.add_generic_rpc_handlers((generic_handler,))
|
|
|
|
|
|
class WorkServerStub(object):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
|
|
def __init__(self, channel):
|
|
"""Constructor.
|
|
|
|
Args:
|
|
channel: A grpc.Channel.
|
|
"""
|
|
self.GetObject = channel.unary_unary(
|
|
'/WorkServer/GetObject',
|
|
request_serializer=proto_dot_task__pb2.GetRequest.SerializeToString,
|
|
response_deserializer=proto_dot_task__pb2.GetResponse.FromString,
|
|
)
|
|
self.PutObject = channel.unary_unary(
|
|
'/WorkServer/PutObject',
|
|
request_serializer=proto_dot_task__pb2.PutRequest.SerializeToString,
|
|
response_deserializer=proto_dot_task__pb2.PutResponse.FromString,
|
|
)
|
|
self.Execute = channel.stream_stream(
|
|
'/WorkServer/Execute',
|
|
request_serializer=proto_dot_task__pb2.TaskTicket.SerializeToString,
|
|
response_deserializer=proto_dot_task__pb2.Task.FromString,
|
|
)
|
|
|
|
|
|
class WorkServerServicer(object):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
|
|
def GetObject(self, request, context):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
context.set_details('Method not implemented!')
|
|
raise NotImplementedError('Method not implemented!')
|
|
|
|
def PutObject(self, request, context):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
context.set_details('Method not implemented!')
|
|
raise NotImplementedError('Method not implemented!')
|
|
|
|
def Execute(self, request_iterator, context):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
context.set_details('Method not implemented!')
|
|
raise NotImplementedError('Method not implemented!')
|
|
|
|
|
|
def add_WorkServerServicer_to_server(servicer, server):
|
|
rpc_method_handlers = {
|
|
'GetObject': grpc.unary_unary_rpc_method_handler(
|
|
servicer.GetObject,
|
|
request_deserializer=proto_dot_task__pb2.GetRequest.FromString,
|
|
response_serializer=proto_dot_task__pb2.GetResponse.SerializeToString,
|
|
),
|
|
'PutObject': grpc.unary_unary_rpc_method_handler(
|
|
servicer.PutObject,
|
|
request_deserializer=proto_dot_task__pb2.PutRequest.FromString,
|
|
response_serializer=proto_dot_task__pb2.PutResponse.SerializeToString,
|
|
),
|
|
'Execute': grpc.stream_stream_rpc_method_handler(
|
|
servicer.Execute,
|
|
request_deserializer=proto_dot_task__pb2.TaskTicket.FromString,
|
|
response_serializer=proto_dot_task__pb2.Task.SerializeToString,
|
|
),
|
|
}
|
|
generic_handler = grpc.method_handlers_generic_handler(
|
|
'WorkServer', rpc_method_handlers)
|
|
server.add_generic_rpc_handlers((generic_handler,))
|