def_pb2_grpc.py 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. import def_pb2 as def__pb2
  5. class StreamServerStub(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.OpenStream = channel.unary_stream(
  13. '/StreamServer/OpenStream',
  14. request_serializer=def__pb2.RequestCmd.SerializeToString,
  15. response_deserializer=def__pb2.clouds.FromString,
  16. )
  17. self.CloseStream = channel.unary_stream(
  18. '/StreamServer/CloseStream',
  19. request_serializer=def__pb2.RequestCmd.SerializeToString,
  20. response_deserializer=def__pb2.clouds.FromString,
  21. )
  22. class StreamServerServicer(object):
  23. """Missing associated documentation comment in .proto file."""
  24. def OpenStream(self, request, context):
  25. """Missing associated documentation comment in .proto file."""
  26. context.set_code(grpc.StatusCode.UNIMPLEMENTED)
  27. context.set_details('Method not implemented!')
  28. raise NotImplementedError('Method not implemented!')
  29. def CloseStream(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 add_StreamServerServicer_to_server(servicer, server):
  35. rpc_method_handlers = {
  36. 'OpenStream': grpc.unary_stream_rpc_method_handler(
  37. servicer.OpenStream,
  38. request_deserializer=def__pb2.RequestCmd.FromString,
  39. response_serializer=def__pb2.clouds.SerializeToString,
  40. ),
  41. 'CloseStream': grpc.unary_stream_rpc_method_handler(
  42. servicer.CloseStream,
  43. request_deserializer=def__pb2.RequestCmd.FromString,
  44. response_serializer=def__pb2.clouds.SerializeToString,
  45. ),
  46. }
  47. generic_handler = grpc.method_handlers_generic_handler(
  48. 'StreamServer', rpc_method_handlers)
  49. server.add_generic_rpc_handlers((generic_handler,))
  50. # This class is part of an EXPERIMENTAL API.
  51. class StreamServer(object):
  52. """Missing associated documentation comment in .proto file."""
  53. @staticmethod
  54. def OpenStream(request,
  55. target,
  56. options=(),
  57. channel_credentials=None,
  58. call_credentials=None,
  59. insecure=False,
  60. compression=None,
  61. wait_for_ready=None,
  62. timeout=None,
  63. metadata=None):
  64. return grpc.experimental.unary_stream(request, target, '/StreamServer/OpenStream',
  65. def__pb2.RequestCmd.SerializeToString,
  66. def__pb2.clouds.FromString,
  67. options, channel_credentials,
  68. insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
  69. @staticmethod
  70. def CloseStream(request,
  71. target,
  72. options=(),
  73. channel_credentials=None,
  74. call_credentials=None,
  75. insecure=False,
  76. compression=None,
  77. wait_for_ready=None,
  78. timeout=None,
  79. metadata=None):
  80. return grpc.experimental.unary_stream(request, target, '/StreamServer/CloseStream',
  81. def__pb2.RequestCmd.SerializeToString,
  82. def__pb2.clouds.FromString,
  83. options, channel_credentials,
  84. insecure, call_credentials, compression, wait_for_ready, timeout, metadata)