Private
Public Access
1
0
Files
rowsandall/rowers/otw_power_calculator_pb2_grpc.py
Sander Roosendaal 921e58eef7 not working
2019-12-19 12:44:07 +01:00

47 lines
1.4 KiB
Python

# 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,))