server_service_pb2_grpc.py 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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. from easyfl.pb import server_service_pb2 as easyfl_dot_pb_dot_server__service__pb2
  5. class ServerServiceStub(object):
  6. """Missing associated documentation comment in .proto file."""
  7. def __init__(self, channel):
  8. """Constructor.
  9. Args:
  10. channel: A grpc.Channel.
  11. """
  12. self.Upload = channel.unary_unary(
  13. '/easyfl.pb.ServerService/Upload',
  14. request_serializer=easyfl_dot_pb_dot_server__service__pb2.UploadRequest.SerializeToString,
  15. response_deserializer=easyfl_dot_pb_dot_server__service__pb2.UploadResponse.FromString,
  16. )
  17. self.Run = channel.unary_unary(
  18. '/easyfl.pb.ServerService/Run',
  19. request_serializer=easyfl_dot_pb_dot_server__service__pb2.RunRequest.SerializeToString,
  20. response_deserializer=easyfl_dot_pb_dot_server__service__pb2.RunResponse.FromString,
  21. )
  22. self.Stop = channel.unary_unary(
  23. '/easyfl.pb.ServerService/Stop',
  24. request_serializer=easyfl_dot_pb_dot_server__service__pb2.StopRequest.SerializeToString,
  25. response_deserializer=easyfl_dot_pb_dot_server__service__pb2.StopResponse.FromString,
  26. )
  27. class ServerServiceServicer(object):
  28. """Missing associated documentation comment in .proto file."""
  29. def Upload(self, request, context):
  30. """Missing associated documentation comment in .proto file."""
  31. context.set_code(grpc.StatusCode.UNIMPLEMENTED)
  32. context.set_details('Method not implemented!')
  33. raise NotImplementedError('Method not implemented!')
  34. def Run(self, request, context):
  35. """Missing associated documentation comment in .proto file."""
  36. context.set_code(grpc.StatusCode.UNIMPLEMENTED)
  37. context.set_details('Method not implemented!')
  38. raise NotImplementedError('Method not implemented!')
  39. def Stop(self, request, context):
  40. """Missing associated documentation comment in .proto file."""
  41. context.set_code(grpc.StatusCode.UNIMPLEMENTED)
  42. context.set_details('Method not implemented!')
  43. raise NotImplementedError('Method not implemented!')
  44. def add_ServerServiceServicer_to_server(servicer, server):
  45. rpc_method_handlers = {
  46. 'Upload': grpc.unary_unary_rpc_method_handler(
  47. servicer.Upload,
  48. request_deserializer=easyfl_dot_pb_dot_server__service__pb2.UploadRequest.FromString,
  49. response_serializer=easyfl_dot_pb_dot_server__service__pb2.UploadResponse.SerializeToString,
  50. ),
  51. 'Run': grpc.unary_unary_rpc_method_handler(
  52. servicer.Run,
  53. request_deserializer=easyfl_dot_pb_dot_server__service__pb2.RunRequest.FromString,
  54. response_serializer=easyfl_dot_pb_dot_server__service__pb2.RunResponse.SerializeToString,
  55. ),
  56. 'Stop': grpc.unary_unary_rpc_method_handler(
  57. servicer.Stop,
  58. request_deserializer=easyfl_dot_pb_dot_server__service__pb2.StopRequest.FromString,
  59. response_serializer=easyfl_dot_pb_dot_server__service__pb2.StopResponse.SerializeToString,
  60. ),
  61. }
  62. generic_handler = grpc.method_handlers_generic_handler(
  63. 'easyfl.pb.ServerService', rpc_method_handlers)
  64. server.add_generic_rpc_handlers((generic_handler,))
  65. # This class is part of an EXPERIMENTAL API.
  66. class ServerService(object):
  67. """Missing associated documentation comment in .proto file."""
  68. @staticmethod
  69. def Upload(request,
  70. target,
  71. options=(),
  72. channel_credentials=None,
  73. call_credentials=None,
  74. insecure=False,
  75. compression=None,
  76. wait_for_ready=None,
  77. timeout=None,
  78. metadata=None):
  79. return grpc.experimental.unary_unary(request, target, '/easyfl.pb.ServerService/Upload',
  80. easyfl_dot_pb_dot_server__service__pb2.UploadRequest.SerializeToString,
  81. easyfl_dot_pb_dot_server__service__pb2.UploadResponse.FromString,
  82. options, channel_credentials,
  83. insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
  84. @staticmethod
  85. def Run(request,
  86. target,
  87. options=(),
  88. channel_credentials=None,
  89. call_credentials=None,
  90. insecure=False,
  91. compression=None,
  92. wait_for_ready=None,
  93. timeout=None,
  94. metadata=None):
  95. return grpc.experimental.unary_unary(request, target, '/easyfl.pb.ServerService/Run',
  96. easyfl_dot_pb_dot_server__service__pb2.RunRequest.SerializeToString,
  97. easyfl_dot_pb_dot_server__service__pb2.RunResponse.FromString,
  98. options, channel_credentials,
  99. insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
  100. @staticmethod
  101. def Stop(request,
  102. target,
  103. options=(),
  104. channel_credentials=None,
  105. call_credentials=None,
  106. insecure=False,
  107. compression=None,
  108. wait_for_ready=None,
  109. timeout=None,
  110. metadata=None):
  111. return grpc.experimental.unary_unary(request, target, '/easyfl.pb.ServerService/Stop',
  112. easyfl_dot_pb_dot_server__service__pb2.StopRequest.SerializeToString,
  113. easyfl_dot_pb_dot_server__service__pb2.StopResponse.FromString,
  114. options, channel_credentials,
  115. insecure, call_credentials, compression, wait_for_ready, timeout, metadata)