shredstream_pb2_grpc.py 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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 shredstream_pb2 as shredstream__pb2
  5. class ShredstreamStub(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.SendHeartbeat = channel.unary_unary(
  13. '/shredstream.Shredstream/SendHeartbeat',
  14. request_serializer=shredstream__pb2.Heartbeat.SerializeToString,
  15. response_deserializer=shredstream__pb2.HeartbeatResponse.FromString,
  16. )
  17. class ShredstreamServicer(object):
  18. """Missing associated documentation comment in .proto file."""
  19. def SendHeartbeat(self, request, context):
  20. """RPC endpoint to send heartbeats to keep shreds flowing
  21. """
  22. context.set_code(grpc.StatusCode.UNIMPLEMENTED)
  23. context.set_details('Method not implemented!')
  24. raise NotImplementedError('Method not implemented!')
  25. def add_ShredstreamServicer_to_server(servicer, server):
  26. rpc_method_handlers = {
  27. 'SendHeartbeat': grpc.unary_unary_rpc_method_handler(
  28. servicer.SendHeartbeat,
  29. request_deserializer=shredstream__pb2.Heartbeat.FromString,
  30. response_serializer=shredstream__pb2.HeartbeatResponse.SerializeToString,
  31. ),
  32. }
  33. generic_handler = grpc.method_handlers_generic_handler(
  34. 'shredstream.Shredstream', rpc_method_handlers)
  35. server.add_generic_rpc_handlers((generic_handler,))
  36. # This class is part of an EXPERIMENTAL API.
  37. class Shredstream(object):
  38. """Missing associated documentation comment in .proto file."""
  39. @staticmethod
  40. def SendHeartbeat(request,
  41. target,
  42. options=(),
  43. channel_credentials=None,
  44. call_credentials=None,
  45. insecure=False,
  46. compression=None,
  47. wait_for_ready=None,
  48. timeout=None,
  49. metadata=None):
  50. return grpc.experimental.unary_unary(request, target, '/shredstream.Shredstream/SendHeartbeat',
  51. shredstream__pb2.Heartbeat.SerializeToString,
  52. shredstream__pb2.HeartbeatResponse.FromString,
  53. options, channel_credentials,
  54. insecure, call_credentials, compression, wait_for_ready, timeout, metadata)