fits_pb2_grpc.py 5.44 KB
Newer Older
Wei Shoulin's avatar
Wei Shoulin committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

from ifs.fits import fits_pb2 as ifs_dot_fits_dot_fits__pb2


class FitsSrvStub(object):
  # missing associated documentation comment in .proto file
  pass

  def __init__(self, channel):
    """Constructor.

    Args:
      channel: A grpc.Channel.
    """
    self.find = channel.unary_unary(
        '/ifs.fits.FitsSrv/find',
        request_serializer=ifs_dot_fits_dot_fits__pb2.FindRawFitsReq.SerializeToString,
        response_deserializer=ifs_dot_fits_dot_fits__pb2.FindRawFitsResp.FromString,
        )
    self.get = channel.unary_unary(
        '/ifs.fits.FitsSrv/get',
        request_serializer=ifs_dot_fits_dot_fits__pb2.GetRawFitsReq.SerializeToString,
        response_deserializer=ifs_dot_fits_dot_fits__pb2.GetRawFitsResp.FromString,
        )
    self.read = channel.unary_stream(
        '/ifs.fits.FitsSrv/read',
        request_serializer=ifs_dot_fits_dot_fits__pb2.ReadRawFitsReq.SerializeToString,
        response_deserializer=ifs_dot_fits_dot_fits__pb2.ReadRawFitsResp.FromString,
        )
    self.write = channel.stream_unary(
        '/ifs.fits.FitsSrv/write',
        request_serializer=ifs_dot_fits_dot_fits__pb2.WriteRawFitsReq.SerializeToString,
        response_deserializer=ifs_dot_fits_dot_fits__pb2.WriteRawFitsResp.FromString,
        )
    self.update_qc0_status = channel.unary_unary(
        '/ifs.fits.FitsSrv/update_qc0_status',
        request_serializer=ifs_dot_fits_dot_fits__pb2.UpdateQc0StatusReq.SerializeToString,
        response_deserializer=ifs_dot_fits_dot_fits__pb2.UpdateQc0StatusResp.FromString,
        )
    self.update_proc_status = channel.unary_unary(
        '/ifs.fits.FitsSrv/update_proc_status',
        request_serializer=ifs_dot_fits_dot_fits__pb2.UpdateProcStatusReq.SerializeToString,
        response_deserializer=ifs_dot_fits_dot_fits__pb2.UpdateProcStatusResp.FromString,
        )


class FitsSrvServicer(object):
  # missing associated documentation comment in .proto file
  pass

  def find(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 get(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 read(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 write(self, request_iterator, 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 update_qc0_status(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 update_proc_status(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_FitsSrvServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'find': grpc.unary_unary_rpc_method_handler(
          servicer.find,
          request_deserializer=ifs_dot_fits_dot_fits__pb2.FindRawFitsReq.FromString,
          response_serializer=ifs_dot_fits_dot_fits__pb2.FindRawFitsResp.SerializeToString,
      ),
      'get': grpc.unary_unary_rpc_method_handler(
          servicer.get,
          request_deserializer=ifs_dot_fits_dot_fits__pb2.GetRawFitsReq.FromString,
          response_serializer=ifs_dot_fits_dot_fits__pb2.GetRawFitsResp.SerializeToString,
      ),
      'read': grpc.unary_stream_rpc_method_handler(
          servicer.read,
          request_deserializer=ifs_dot_fits_dot_fits__pb2.ReadRawFitsReq.FromString,
          response_serializer=ifs_dot_fits_dot_fits__pb2.ReadRawFitsResp.SerializeToString,
      ),
      'write': grpc.stream_unary_rpc_method_handler(
          servicer.write,
          request_deserializer=ifs_dot_fits_dot_fits__pb2.WriteRawFitsReq.FromString,
          response_serializer=ifs_dot_fits_dot_fits__pb2.WriteRawFitsResp.SerializeToString,
      ),
      'update_qc0_status': grpc.unary_unary_rpc_method_handler(
          servicer.update_qc0_status,
          request_deserializer=ifs_dot_fits_dot_fits__pb2.UpdateQc0StatusReq.FromString,
          response_serializer=ifs_dot_fits_dot_fits__pb2.UpdateQc0StatusResp.SerializeToString,
      ),
      'update_proc_status': grpc.unary_unary_rpc_method_handler(
          servicer.update_proc_status,
          request_deserializer=ifs_dot_fits_dot_fits__pb2.UpdateProcStatusReq.FromString,
          response_serializer=ifs_dot_fits_dot_fits__pb2.UpdateProcStatusResp.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'ifs.fits.FitsSrv', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))