-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathnode_pb2_grpc.py
198 lines (177 loc) · 8.06 KB
/
node_pb2_grpc.py
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
import proto.node_pb2 as node__pb2
class NodeServiceStub(object):
"""Missing associated documentation comment in .proto file."""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.GetChunk = channel.unary_unary(
'/node.NodeService/GetChunk',
request_serializer=node__pb2.GetChunkRequest.SerializeToString,
response_deserializer=node__pb2.GetChunkResponse.FromString,
)
self.Verify = channel.unary_unary(
'/node.NodeService/Verify',
request_serializer=node__pb2.VerifyRequest.SerializeToString,
response_deserializer=node__pb2.VerifyResponse.FromString,
)
self.SaveChunk = channel.unary_unary(
'/node.NodeService/SaveChunk',
request_serializer=node__pb2.SaveChunkRequest.SerializeToString,
response_deserializer=node__pb2.SaveChunkResponse.FromString,
)
self.DeliverBlock = channel.unary_unary(
'/node.NodeService/DeliverBlock',
request_serializer=node__pb2.grpcBlock.SerializeToString,
response_deserializer=node__pb2.BlockResponse.FromString,
)
self.DeliverModel = channel.unary_unary(
'/node.NodeService/DeliverModel',
request_serializer=node__pb2.grpcModel.SerializeToString,
response_deserializer=node__pb2.ModelResponse.FromString,
)
class NodeServiceServicer(object):
"""Missing associated documentation comment in .proto file."""
def GetChunk(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Verify(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def SaveChunk(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def DeliverBlock(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def DeliverModel(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_NodeServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'GetChunk': grpc.unary_unary_rpc_method_handler(
servicer.GetChunk,
request_deserializer=node__pb2.GetChunkRequest.FromString,
response_serializer=node__pb2.GetChunkResponse.SerializeToString,
),
'Verify': grpc.unary_unary_rpc_method_handler(
servicer.Verify,
request_deserializer=node__pb2.VerifyRequest.FromString,
response_serializer=node__pb2.VerifyResponse.SerializeToString,
),
'SaveChunk': grpc.unary_unary_rpc_method_handler(
servicer.SaveChunk,
request_deserializer=node__pb2.SaveChunkRequest.FromString,
response_serializer=node__pb2.SaveChunkResponse.SerializeToString,
),
'DeliverBlock': grpc.unary_unary_rpc_method_handler(
servicer.DeliverBlock,
request_deserializer=node__pb2.grpcBlock.FromString,
response_serializer=node__pb2.BlockResponse.SerializeToString,
),
'DeliverModel': grpc.unary_unary_rpc_method_handler(
servicer.DeliverModel,
request_deserializer=node__pb2.grpcModel.FromString,
response_serializer=node__pb2.ModelResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'node.NodeService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
# This class is part of an EXPERIMENTAL API.
class NodeService(object):
"""Missing associated documentation comment in .proto file."""
@staticmethod
def GetChunk(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/node.NodeService/GetChunk',
node__pb2.GetChunkRequest.SerializeToString,
node__pb2.GetChunkResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def Verify(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/node.NodeService/Verify',
node__pb2.VerifyRequest.SerializeToString,
node__pb2.VerifyResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def SaveChunk(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/node.NodeService/SaveChunk',
node__pb2.SaveChunkRequest.SerializeToString,
node__pb2.SaveChunkResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def DeliverBlock(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/node.NodeService/DeliverBlock',
node__pb2.grpcBlock.SerializeToString,
node__pb2.BlockResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def DeliverModel(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/node.NodeService/DeliverModel',
node__pb2.grpcModel.SerializeToString,
node__pb2.ModelResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)