not working
This commit is contained in:
46
rowers/otw_power_calculator_pb2_grpc.py
Normal file
46
rowers/otw_power_calculator_pb2_grpc.py
Normal file
@@ -0,0 +1,46 @@
|
||||
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
||||
import grpc
|
||||
|
||||
import rowers.otw_power_calculator_pb2 as otw__power__calculator__pb2
|
||||
|
||||
|
||||
class PowerStub(object):
|
||||
"""Power service definition
|
||||
"""
|
||||
|
||||
def __init__(self, channel):
|
||||
"""Constructor.
|
||||
|
||||
Args:
|
||||
channel: A grpc.Channel.
|
||||
"""
|
||||
self.CalcPower = channel.unary_unary(
|
||||
'/otw_power_calculator.Power/CalcPower',
|
||||
request_serializer=otw__power__calculator__pb2.WorkoutPowerRequest.SerializeToString,
|
||||
response_deserializer=otw__power__calculator__pb2.CalculationResult.FromString,
|
||||
)
|
||||
|
||||
|
||||
class PowerServicer(object):
|
||||
"""Power service definition
|
||||
"""
|
||||
|
||||
def CalcPower(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_PowerServicer_to_server(servicer, server):
|
||||
rpc_method_handlers = {
|
||||
'CalcPower': grpc.unary_unary_rpc_method_handler(
|
||||
servicer.CalcPower,
|
||||
request_deserializer=otw__power__calculator__pb2.WorkoutPowerRequest.FromString,
|
||||
response_serializer=otw__power__calculator__pb2.CalculationResult.SerializeToString,
|
||||
),
|
||||
}
|
||||
generic_handler = grpc.method_handlers_generic_handler(
|
||||
'otw_power_calculator.Power', rpc_method_handlers)
|
||||
server.add_generic_rpc_handlers((generic_handler,))
|
||||
Reference in New Issue
Block a user