OLD | NEW |
| (Empty) |
1 # Generated by the protocol buffer compiler. DO NOT EDIT! | |
2 # source: isolate_bot.proto | |
3 | |
4 import sys | |
5 _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) | |
6 from google.protobuf import descriptor as _descriptor | |
7 from google.protobuf import message as _message | |
8 from google.protobuf import reflection as _reflection | |
9 from google.protobuf import symbol_database as _symbol_database | |
10 from google.protobuf import descriptor_pb2 | |
11 # @@protoc_insertion_point(imports) | |
12 | |
13 _sym_db = _symbol_database.Default() | |
14 | |
15 | |
16 | |
17 | |
18 DESCRIPTOR = _descriptor.FileDescriptor( | |
19 name='isolate_bot.proto', | |
20 package='luci.swarming.bot', | |
21 syntax='proto3', | |
22 serialized_pb=_b('\n\x11isolate_bot.proto\x12\x11luci.swarming.bot\"C\n\x0f\x4
3ontainsRequest\x12\x30\n\x06\x64igest\x18\x01 \x03(\x0b\x32 .luci.swarming.bot.
ContentDigest\">\n\rContainsReply\x12-\n\x06status\x18\x01 \x01(\x0b\x32\x1d.luc
i.swarming.bot.BlobStatus\">\n\x10PushBlobsRequest\x12*\n\x04\x64\x61ta\x18\x01
\x01(\x0b\x32\x1c.luci.swarming.bot.BlobChunk\"?\n\x0ePushBlobsReply\x12-\n\x06s
tatus\x18\x01 \x01(\x0b\x32\x1d.luci.swarming.bot.BlobStatus\"E\n\x11\x46\x65tch
BlobsRequest\x12\x30\n\x06\x64igest\x18\x01 \x03(\x0b\x32 .luci.swarming.bot.Con
tentDigest\"l\n\x0f\x46\x65tchBlobsReply\x12-\n\x06status\x18\x01 \x01(\x0b\x32\
x1d.luci.swarming.bot.BlobStatus\x12*\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1c.
luci.swarming.bot.BlobChunk\"[\n\tBlobChunk\x12\x30\n\x06\x64igest\x18\x01 \x01(
\x0b\x32 .luci.swarming.bot.ContentDigest\x12\x0e\n\x06offset\x18\x02 \x01(\x03\
x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\"D\n\rContentDigest\x12\x0e\n\x06\x64i
gest\x18\x01 \x01(\x0c\x12\x12\n\nsize_bytes\x18\x02 \x01(\x03\x12\x0f\n\x07vers
ion\x18\x03 \x01(\x05\"\x80\x02\n\nBlobStatus\x12\x11\n\tsucceeded\x18\x01 \x01(
\x08\x12\x36\n\x05\x65rror\x18\x02 \x01(\x0e\x32\'.luci.swarming.bot.BlobStatus.
ErrorCode\x12\x14\n\x0c\x65rror_detail\x18\x03 \x01(\t\x12\x38\n\x0emissing_dige
st\x18\x04 \x03(\x0b\x32 .luci.swarming.bot.ContentDigest\"W\n\tErrorCode\x12\x0
b\n\x07UNKNOWN\x10\x00\x12\x14\n\x10INVALID_ARGUMENT\x10\x01\x12\x12\n\x0eMISSIN
G_DIGEST\x10\x02\x12\x13\n\x0f\x44IGEST_MISMATCH\x10\x03\x32\x90\x02\n\x0b\x46il
eService\x12P\n\x08\x43ontains\x12\".luci.swarming.bot.ContainsRequest\x1a .luci
.swarming.bot.ContainsReply\x12U\n\tPushBlobs\x12#.luci.swarming.bot.PushBlobsRe
quest\x1a!.luci.swarming.bot.PushBlobsReply(\x01\x12X\n\nFetchBlobs\x12$.luci.sw
arming.bot.FetchBlobsRequest\x1a\".luci.swarming.bot.FetchBlobsReply0\x01\x62\x0
6proto3') | |
23 ) | |
24 _sym_db.RegisterFileDescriptor(DESCRIPTOR) | |
25 | |
26 | |
27 | |
28 _BLOBSTATUS_ERRORCODE = _descriptor.EnumDescriptor( | |
29 name='ErrorCode', | |
30 full_name='luci.swarming.bot.BlobStatus.ErrorCode', | |
31 filename=None, | |
32 file=DESCRIPTOR, | |
33 values=[ | |
34 _descriptor.EnumValueDescriptor( | |
35 name='UNKNOWN', index=0, number=0, | |
36 options=None, | |
37 type=None), | |
38 _descriptor.EnumValueDescriptor( | |
39 name='INVALID_ARGUMENT', index=1, number=1, | |
40 options=None, | |
41 type=None), | |
42 _descriptor.EnumValueDescriptor( | |
43 name='MISSING_DIGEST', index=2, number=2, | |
44 options=None, | |
45 type=None), | |
46 _descriptor.EnumValueDescriptor( | |
47 name='DIGEST_MISMATCH', index=3, number=3, | |
48 options=None, | |
49 type=None), | |
50 ], | |
51 containing_type=None, | |
52 options=None, | |
53 serialized_start=816, | |
54 serialized_end=903, | |
55 ) | |
56 _sym_db.RegisterEnumDescriptor(_BLOBSTATUS_ERRORCODE) | |
57 | |
58 | |
59 _CONTAINSREQUEST = _descriptor.Descriptor( | |
60 name='ContainsRequest', | |
61 full_name='luci.swarming.bot.ContainsRequest', | |
62 filename=None, | |
63 file=DESCRIPTOR, | |
64 containing_type=None, | |
65 fields=[ | |
66 _descriptor.FieldDescriptor( | |
67 name='digest', full_name='luci.swarming.bot.ContainsRequest.digest', index
=0, | |
68 number=1, type=11, cpp_type=10, label=3, | |
69 has_default_value=False, default_value=[], | |
70 message_type=None, enum_type=None, containing_type=None, | |
71 is_extension=False, extension_scope=None, | |
72 options=None), | |
73 ], | |
74 extensions=[ | |
75 ], | |
76 nested_types=[], | |
77 enum_types=[ | |
78 ], | |
79 options=None, | |
80 is_extendable=False, | |
81 syntax='proto3', | |
82 extension_ranges=[], | |
83 oneofs=[ | |
84 ], | |
85 serialized_start=40, | |
86 serialized_end=107, | |
87 ) | |
88 | |
89 | |
90 _CONTAINSREPLY = _descriptor.Descriptor( | |
91 name='ContainsReply', | |
92 full_name='luci.swarming.bot.ContainsReply', | |
93 filename=None, | |
94 file=DESCRIPTOR, | |
95 containing_type=None, | |
96 fields=[ | |
97 _descriptor.FieldDescriptor( | |
98 name='status', full_name='luci.swarming.bot.ContainsReply.status', index=0
, | |
99 number=1, type=11, cpp_type=10, label=1, | |
100 has_default_value=False, default_value=None, | |
101 message_type=None, enum_type=None, containing_type=None, | |
102 is_extension=False, extension_scope=None, | |
103 options=None), | |
104 ], | |
105 extensions=[ | |
106 ], | |
107 nested_types=[], | |
108 enum_types=[ | |
109 ], | |
110 options=None, | |
111 is_extendable=False, | |
112 syntax='proto3', | |
113 extension_ranges=[], | |
114 oneofs=[ | |
115 ], | |
116 serialized_start=109, | |
117 serialized_end=171, | |
118 ) | |
119 | |
120 | |
121 _PUSHBLOBSREQUEST = _descriptor.Descriptor( | |
122 name='PushBlobsRequest', | |
123 full_name='luci.swarming.bot.PushBlobsRequest', | |
124 filename=None, | |
125 file=DESCRIPTOR, | |
126 containing_type=None, | |
127 fields=[ | |
128 _descriptor.FieldDescriptor( | |
129 name='data', full_name='luci.swarming.bot.PushBlobsRequest.data', index=0, | |
130 number=1, type=11, cpp_type=10, label=1, | |
131 has_default_value=False, default_value=None, | |
132 message_type=None, enum_type=None, containing_type=None, | |
133 is_extension=False, extension_scope=None, | |
134 options=None), | |
135 ], | |
136 extensions=[ | |
137 ], | |
138 nested_types=[], | |
139 enum_types=[ | |
140 ], | |
141 options=None, | |
142 is_extendable=False, | |
143 syntax='proto3', | |
144 extension_ranges=[], | |
145 oneofs=[ | |
146 ], | |
147 serialized_start=173, | |
148 serialized_end=235, | |
149 ) | |
150 | |
151 | |
152 _PUSHBLOBSREPLY = _descriptor.Descriptor( | |
153 name='PushBlobsReply', | |
154 full_name='luci.swarming.bot.PushBlobsReply', | |
155 filename=None, | |
156 file=DESCRIPTOR, | |
157 containing_type=None, | |
158 fields=[ | |
159 _descriptor.FieldDescriptor( | |
160 name='status', full_name='luci.swarming.bot.PushBlobsReply.status', index=
0, | |
161 number=1, type=11, cpp_type=10, label=1, | |
162 has_default_value=False, default_value=None, | |
163 message_type=None, enum_type=None, containing_type=None, | |
164 is_extension=False, extension_scope=None, | |
165 options=None), | |
166 ], | |
167 extensions=[ | |
168 ], | |
169 nested_types=[], | |
170 enum_types=[ | |
171 ], | |
172 options=None, | |
173 is_extendable=False, | |
174 syntax='proto3', | |
175 extension_ranges=[], | |
176 oneofs=[ | |
177 ], | |
178 serialized_start=237, | |
179 serialized_end=300, | |
180 ) | |
181 | |
182 | |
183 _FETCHBLOBSREQUEST = _descriptor.Descriptor( | |
184 name='FetchBlobsRequest', | |
185 full_name='luci.swarming.bot.FetchBlobsRequest', | |
186 filename=None, | |
187 file=DESCRIPTOR, | |
188 containing_type=None, | |
189 fields=[ | |
190 _descriptor.FieldDescriptor( | |
191 name='digest', full_name='luci.swarming.bot.FetchBlobsRequest.digest', ind
ex=0, | |
192 number=1, type=11, cpp_type=10, label=3, | |
193 has_default_value=False, default_value=[], | |
194 message_type=None, enum_type=None, containing_type=None, | |
195 is_extension=False, extension_scope=None, | |
196 options=None), | |
197 ], | |
198 extensions=[ | |
199 ], | |
200 nested_types=[], | |
201 enum_types=[ | |
202 ], | |
203 options=None, | |
204 is_extendable=False, | |
205 syntax='proto3', | |
206 extension_ranges=[], | |
207 oneofs=[ | |
208 ], | |
209 serialized_start=302, | |
210 serialized_end=371, | |
211 ) | |
212 | |
213 | |
214 _FETCHBLOBSREPLY = _descriptor.Descriptor( | |
215 name='FetchBlobsReply', | |
216 full_name='luci.swarming.bot.FetchBlobsReply', | |
217 filename=None, | |
218 file=DESCRIPTOR, | |
219 containing_type=None, | |
220 fields=[ | |
221 _descriptor.FieldDescriptor( | |
222 name='status', full_name='luci.swarming.bot.FetchBlobsReply.status', index
=0, | |
223 number=1, type=11, cpp_type=10, label=1, | |
224 has_default_value=False, default_value=None, | |
225 message_type=None, enum_type=None, containing_type=None, | |
226 is_extension=False, extension_scope=None, | |
227 options=None), | |
228 _descriptor.FieldDescriptor( | |
229 name='data', full_name='luci.swarming.bot.FetchBlobsReply.data', index=1, | |
230 number=2, type=11, cpp_type=10, label=1, | |
231 has_default_value=False, default_value=None, | |
232 message_type=None, enum_type=None, containing_type=None, | |
233 is_extension=False, extension_scope=None, | |
234 options=None), | |
235 ], | |
236 extensions=[ | |
237 ], | |
238 nested_types=[], | |
239 enum_types=[ | |
240 ], | |
241 options=None, | |
242 is_extendable=False, | |
243 syntax='proto3', | |
244 extension_ranges=[], | |
245 oneofs=[ | |
246 ], | |
247 serialized_start=373, | |
248 serialized_end=481, | |
249 ) | |
250 | |
251 | |
252 _BLOBCHUNK = _descriptor.Descriptor( | |
253 name='BlobChunk', | |
254 full_name='luci.swarming.bot.BlobChunk', | |
255 filename=None, | |
256 file=DESCRIPTOR, | |
257 containing_type=None, | |
258 fields=[ | |
259 _descriptor.FieldDescriptor( | |
260 name='digest', full_name='luci.swarming.bot.BlobChunk.digest', index=0, | |
261 number=1, type=11, cpp_type=10, label=1, | |
262 has_default_value=False, default_value=None, | |
263 message_type=None, enum_type=None, containing_type=None, | |
264 is_extension=False, extension_scope=None, | |
265 options=None), | |
266 _descriptor.FieldDescriptor( | |
267 name='offset', full_name='luci.swarming.bot.BlobChunk.offset', index=1, | |
268 number=2, type=3, cpp_type=2, label=1, | |
269 has_default_value=False, default_value=0, | |
270 message_type=None, enum_type=None, containing_type=None, | |
271 is_extension=False, extension_scope=None, | |
272 options=None), | |
273 _descriptor.FieldDescriptor( | |
274 name='data', full_name='luci.swarming.bot.BlobChunk.data', index=2, | |
275 number=3, type=12, cpp_type=9, label=1, | |
276 has_default_value=False, default_value=_b(""), | |
277 message_type=None, enum_type=None, containing_type=None, | |
278 is_extension=False, extension_scope=None, | |
279 options=None), | |
280 ], | |
281 extensions=[ | |
282 ], | |
283 nested_types=[], | |
284 enum_types=[ | |
285 ], | |
286 options=None, | |
287 is_extendable=False, | |
288 syntax='proto3', | |
289 extension_ranges=[], | |
290 oneofs=[ | |
291 ], | |
292 serialized_start=483, | |
293 serialized_end=574, | |
294 ) | |
295 | |
296 | |
297 _CONTENTDIGEST = _descriptor.Descriptor( | |
298 name='ContentDigest', | |
299 full_name='luci.swarming.bot.ContentDigest', | |
300 filename=None, | |
301 file=DESCRIPTOR, | |
302 containing_type=None, | |
303 fields=[ | |
304 _descriptor.FieldDescriptor( | |
305 name='digest', full_name='luci.swarming.bot.ContentDigest.digest', index=0
, | |
306 number=1, type=12, cpp_type=9, label=1, | |
307 has_default_value=False, default_value=_b(""), | |
308 message_type=None, enum_type=None, containing_type=None, | |
309 is_extension=False, extension_scope=None, | |
310 options=None), | |
311 _descriptor.FieldDescriptor( | |
312 name='size_bytes', full_name='luci.swarming.bot.ContentDigest.size_bytes',
index=1, | |
313 number=2, type=3, cpp_type=2, label=1, | |
314 has_default_value=False, default_value=0, | |
315 message_type=None, enum_type=None, containing_type=None, | |
316 is_extension=False, extension_scope=None, | |
317 options=None), | |
318 _descriptor.FieldDescriptor( | |
319 name='version', full_name='luci.swarming.bot.ContentDigest.version', index
=2, | |
320 number=3, type=5, cpp_type=1, label=1, | |
321 has_default_value=False, default_value=0, | |
322 message_type=None, enum_type=None, containing_type=None, | |
323 is_extension=False, extension_scope=None, | |
324 options=None), | |
325 ], | |
326 extensions=[ | |
327 ], | |
328 nested_types=[], | |
329 enum_types=[ | |
330 ], | |
331 options=None, | |
332 is_extendable=False, | |
333 syntax='proto3', | |
334 extension_ranges=[], | |
335 oneofs=[ | |
336 ], | |
337 serialized_start=576, | |
338 serialized_end=644, | |
339 ) | |
340 | |
341 | |
342 _BLOBSTATUS = _descriptor.Descriptor( | |
343 name='BlobStatus', | |
344 full_name='luci.swarming.bot.BlobStatus', | |
345 filename=None, | |
346 file=DESCRIPTOR, | |
347 containing_type=None, | |
348 fields=[ | |
349 _descriptor.FieldDescriptor( | |
350 name='succeeded', full_name='luci.swarming.bot.BlobStatus.succeeded', inde
x=0, | |
351 number=1, type=8, cpp_type=7, label=1, | |
352 has_default_value=False, default_value=False, | |
353 message_type=None, enum_type=None, containing_type=None, | |
354 is_extension=False, extension_scope=None, | |
355 options=None), | |
356 _descriptor.FieldDescriptor( | |
357 name='error', full_name='luci.swarming.bot.BlobStatus.error', index=1, | |
358 number=2, type=14, cpp_type=8, label=1, | |
359 has_default_value=False, default_value=0, | |
360 message_type=None, enum_type=None, containing_type=None, | |
361 is_extension=False, extension_scope=None, | |
362 options=None), | |
363 _descriptor.FieldDescriptor( | |
364 name='error_detail', full_name='luci.swarming.bot.BlobStatus.error_detail'
, index=2, | |
365 number=3, type=9, cpp_type=9, label=1, | |
366 has_default_value=False, default_value=_b("").decode('utf-8'), | |
367 message_type=None, enum_type=None, containing_type=None, | |
368 is_extension=False, extension_scope=None, | |
369 options=None), | |
370 _descriptor.FieldDescriptor( | |
371 name='missing_digest', full_name='luci.swarming.bot.BlobStatus.missing_dig
est', index=3, | |
372 number=4, type=11, cpp_type=10, label=3, | |
373 has_default_value=False, default_value=[], | |
374 message_type=None, enum_type=None, containing_type=None, | |
375 is_extension=False, extension_scope=None, | |
376 options=None), | |
377 ], | |
378 extensions=[ | |
379 ], | |
380 nested_types=[], | |
381 enum_types=[ | |
382 _BLOBSTATUS_ERRORCODE, | |
383 ], | |
384 options=None, | |
385 is_extendable=False, | |
386 syntax='proto3', | |
387 extension_ranges=[], | |
388 oneofs=[ | |
389 ], | |
390 serialized_start=647, | |
391 serialized_end=903, | |
392 ) | |
393 | |
394 _CONTAINSREQUEST.fields_by_name['digest'].message_type = _CONTENTDIGEST | |
395 _CONTAINSREPLY.fields_by_name['status'].message_type = _BLOBSTATUS | |
396 _PUSHBLOBSREQUEST.fields_by_name['data'].message_type = _BLOBCHUNK | |
397 _PUSHBLOBSREPLY.fields_by_name['status'].message_type = _BLOBSTATUS | |
398 _FETCHBLOBSREQUEST.fields_by_name['digest'].message_type = _CONTENTDIGEST | |
399 _FETCHBLOBSREPLY.fields_by_name['status'].message_type = _BLOBSTATUS | |
400 _FETCHBLOBSREPLY.fields_by_name['data'].message_type = _BLOBCHUNK | |
401 _BLOBCHUNK.fields_by_name['digest'].message_type = _CONTENTDIGEST | |
402 _BLOBSTATUS.fields_by_name['error'].enum_type = _BLOBSTATUS_ERRORCODE | |
403 _BLOBSTATUS.fields_by_name['missing_digest'].message_type = _CONTENTDIGEST | |
404 _BLOBSTATUS_ERRORCODE.containing_type = _BLOBSTATUS | |
405 DESCRIPTOR.message_types_by_name['ContainsRequest'] = _CONTAINSREQUEST | |
406 DESCRIPTOR.message_types_by_name['ContainsReply'] = _CONTAINSREPLY | |
407 DESCRIPTOR.message_types_by_name['PushBlobsRequest'] = _PUSHBLOBSREQUEST | |
408 DESCRIPTOR.message_types_by_name['PushBlobsReply'] = _PUSHBLOBSREPLY | |
409 DESCRIPTOR.message_types_by_name['FetchBlobsRequest'] = _FETCHBLOBSREQUEST | |
410 DESCRIPTOR.message_types_by_name['FetchBlobsReply'] = _FETCHBLOBSREPLY | |
411 DESCRIPTOR.message_types_by_name['BlobChunk'] = _BLOBCHUNK | |
412 DESCRIPTOR.message_types_by_name['ContentDigest'] = _CONTENTDIGEST | |
413 DESCRIPTOR.message_types_by_name['BlobStatus'] = _BLOBSTATUS | |
414 | |
415 ContainsRequest = _reflection.GeneratedProtocolMessageType('ContainsRequest', (_
message.Message,), dict( | |
416 DESCRIPTOR = _CONTAINSREQUEST, | |
417 __module__ = 'isolate_bot_pb2' | |
418 # @@protoc_insertion_point(class_scope:luci.swarming.bot.ContainsRequest) | |
419 )) | |
420 _sym_db.RegisterMessage(ContainsRequest) | |
421 | |
422 ContainsReply = _reflection.GeneratedProtocolMessageType('ContainsReply', (_mess
age.Message,), dict( | |
423 DESCRIPTOR = _CONTAINSREPLY, | |
424 __module__ = 'isolate_bot_pb2' | |
425 # @@protoc_insertion_point(class_scope:luci.swarming.bot.ContainsReply) | |
426 )) | |
427 _sym_db.RegisterMessage(ContainsReply) | |
428 | |
429 PushBlobsRequest = _reflection.GeneratedProtocolMessageType('PushBlobsRequest',
(_message.Message,), dict( | |
430 DESCRIPTOR = _PUSHBLOBSREQUEST, | |
431 __module__ = 'isolate_bot_pb2' | |
432 # @@protoc_insertion_point(class_scope:luci.swarming.bot.PushBlobsRequest) | |
433 )) | |
434 _sym_db.RegisterMessage(PushBlobsRequest) | |
435 | |
436 PushBlobsReply = _reflection.GeneratedProtocolMessageType('PushBlobsReply', (_me
ssage.Message,), dict( | |
437 DESCRIPTOR = _PUSHBLOBSREPLY, | |
438 __module__ = 'isolate_bot_pb2' | |
439 # @@protoc_insertion_point(class_scope:luci.swarming.bot.PushBlobsReply) | |
440 )) | |
441 _sym_db.RegisterMessage(PushBlobsReply) | |
442 | |
443 FetchBlobsRequest = _reflection.GeneratedProtocolMessageType('FetchBlobsRequest'
, (_message.Message,), dict( | |
444 DESCRIPTOR = _FETCHBLOBSREQUEST, | |
445 __module__ = 'isolate_bot_pb2' | |
446 # @@protoc_insertion_point(class_scope:luci.swarming.bot.FetchBlobsRequest) | |
447 )) | |
448 _sym_db.RegisterMessage(FetchBlobsRequest) | |
449 | |
450 FetchBlobsReply = _reflection.GeneratedProtocolMessageType('FetchBlobsReply', (_
message.Message,), dict( | |
451 DESCRIPTOR = _FETCHBLOBSREPLY, | |
452 __module__ = 'isolate_bot_pb2' | |
453 # @@protoc_insertion_point(class_scope:luci.swarming.bot.FetchBlobsReply) | |
454 )) | |
455 _sym_db.RegisterMessage(FetchBlobsReply) | |
456 | |
457 BlobChunk = _reflection.GeneratedProtocolMessageType('BlobChunk', (_message.Mess
age,), dict( | |
458 DESCRIPTOR = _BLOBCHUNK, | |
459 __module__ = 'isolate_bot_pb2' | |
460 # @@protoc_insertion_point(class_scope:luci.swarming.bot.BlobChunk) | |
461 )) | |
462 _sym_db.RegisterMessage(BlobChunk) | |
463 | |
464 ContentDigest = _reflection.GeneratedProtocolMessageType('ContentDigest', (_mess
age.Message,), dict( | |
465 DESCRIPTOR = _CONTENTDIGEST, | |
466 __module__ = 'isolate_bot_pb2' | |
467 # @@protoc_insertion_point(class_scope:luci.swarming.bot.ContentDigest) | |
468 )) | |
469 _sym_db.RegisterMessage(ContentDigest) | |
470 | |
471 BlobStatus = _reflection.GeneratedProtocolMessageType('BlobStatus', (_message.Me
ssage,), dict( | |
472 DESCRIPTOR = _BLOBSTATUS, | |
473 __module__ = 'isolate_bot_pb2' | |
474 # @@protoc_insertion_point(class_scope:luci.swarming.bot.BlobStatus) | |
475 )) | |
476 _sym_db.RegisterMessage(BlobStatus) | |
477 | |
478 | |
479 try: | |
480 # THESE ELEMENTS WILL BE DEPRECATED. | |
481 # Please use the generated *_pb2_grpc.py files instead. | |
482 import grpc | |
483 from grpc.framework.common import cardinality | |
484 from grpc.framework.interfaces.face import utilities as face_utilities | |
485 from grpc.beta import implementations as beta_implementations | |
486 from grpc.beta import interfaces as beta_interfaces | |
487 | |
488 | |
489 class FileServiceStub(object): | |
490 """FileService exposes the main operations of an Isolate server | |
491 to upload and download blobs. | |
492 """ | |
493 | |
494 def __init__(self, channel): | |
495 """Constructor. | |
496 | |
497 Args: | |
498 channel: A grpc.Channel. | |
499 """ | |
500 self.Contains = channel.unary_unary( | |
501 '/luci.swarming.bot.FileService/Contains', | |
502 request_serializer=ContainsRequest.SerializeToString, | |
503 response_deserializer=ContainsReply.FromString, | |
504 ) | |
505 self.PushBlobs = channel.stream_unary( | |
506 '/luci.swarming.bot.FileService/PushBlobs', | |
507 request_serializer=PushBlobsRequest.SerializeToString, | |
508 response_deserializer=PushBlobsReply.FromString, | |
509 ) | |
510 self.FetchBlobs = channel.unary_stream( | |
511 '/luci.swarming.bot.FileService/FetchBlobs', | |
512 request_serializer=FetchBlobsRequest.SerializeToString, | |
513 response_deserializer=FetchBlobsReply.FromString, | |
514 ) | |
515 | |
516 | |
517 class FileServiceServicer(object): | |
518 """FileService exposes the main operations of an Isolate server | |
519 to upload and download blobs. | |
520 """ | |
521 | |
522 def Contains(self, request, context): | |
523 """Unlike in the native Isolate API, it is not *necessary* to | |
524 call Contains prior to pushing a blob, as Contains does not | |
525 return "upload tickets." The BlobStatus returned by Contains | |
526 will have succeeded = True if all digests were found, and | |
527 false for any other reason (missing blobs, network error, | |
528 etc.) | |
529 """ | |
530 context.set_code(grpc.StatusCode.UNIMPLEMENTED) | |
531 context.set_details('Method not implemented!') | |
532 raise NotImplementedError('Method not implemented!') | |
533 | |
534 def PushBlobs(self, request_iterator, context): | |
535 """PushBlobs can push one or more blobs at a time (serially), | |
536 with each blob transmitted as one or more chunks. At the | |
537 beginning of a new blob, the chunk offset should be zero | |
538 and the digest must be provided. The function returns true | |
539 only if all blobs are successfully received, and returns | |
540 as soon as an error occurs. | |
541 """ | |
542 context.set_code(grpc.StatusCode.UNIMPLEMENTED) | |
543 context.set_details('Method not implemented!') | |
544 raise NotImplementedError('Method not implemented!') | |
545 | |
546 def FetchBlobs(self, request, context): | |
547 """FetchBlobs takes a list of digests and returns them all as | |
548 a stream of BlobChunks. | |
549 """ | |
550 context.set_code(grpc.StatusCode.UNIMPLEMENTED) | |
551 context.set_details('Method not implemented!') | |
552 raise NotImplementedError('Method not implemented!') | |
553 | |
554 | |
555 def add_FileServiceServicer_to_server(servicer, server): | |
556 rpc_method_handlers = { | |
557 'Contains': grpc.unary_unary_rpc_method_handler( | |
558 servicer.Contains, | |
559 request_deserializer=ContainsRequest.FromString, | |
560 response_serializer=ContainsReply.SerializeToString, | |
561 ), | |
562 'PushBlobs': grpc.stream_unary_rpc_method_handler( | |
563 servicer.PushBlobs, | |
564 request_deserializer=PushBlobsRequest.FromString, | |
565 response_serializer=PushBlobsReply.SerializeToString, | |
566 ), | |
567 'FetchBlobs': grpc.unary_stream_rpc_method_handler( | |
568 servicer.FetchBlobs, | |
569 request_deserializer=FetchBlobsRequest.FromString, | |
570 response_serializer=FetchBlobsReply.SerializeToString, | |
571 ), | |
572 } | |
573 generic_handler = grpc.method_handlers_generic_handler( | |
574 'luci.swarming.bot.FileService', rpc_method_handlers) | |
575 server.add_generic_rpc_handlers((generic_handler,)) | |
576 | |
577 | |
578 class BetaFileServiceServicer(object): | |
579 """The Beta API is deprecated for 0.15.0 and later. | |
580 | |
581 It is recommended to use the GA API (classes and functions in this | |
582 file not marked beta) for all further purposes. This class was generated | |
583 only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0.""" | |
584 """FileService exposes the main operations of an Isolate server | |
585 to upload and download blobs. | |
586 """ | |
587 def Contains(self, request, context): | |
588 """Unlike in the native Isolate API, it is not *necessary* to | |
589 call Contains prior to pushing a blob, as Contains does not | |
590 return "upload tickets." The BlobStatus returned by Contains | |
591 will have succeeded = True if all digests were found, and | |
592 false for any other reason (missing blobs, network error, | |
593 etc.) | |
594 """ | |
595 context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) | |
596 def PushBlobs(self, request_iterator, context): | |
597 """PushBlobs can push one or more blobs at a time (serially), | |
598 with each blob transmitted as one or more chunks. At the | |
599 beginning of a new blob, the chunk offset should be zero | |
600 and the digest must be provided. The function returns true | |
601 only if all blobs are successfully received, and returns | |
602 as soon as an error occurs. | |
603 """ | |
604 context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) | |
605 def FetchBlobs(self, request, context): | |
606 """FetchBlobs takes a list of digests and returns them all as | |
607 a stream of BlobChunks. | |
608 """ | |
609 context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) | |
610 | |
611 | |
612 class BetaFileServiceStub(object): | |
613 """The Beta API is deprecated for 0.15.0 and later. | |
614 | |
615 It is recommended to use the GA API (classes and functions in this | |
616 file not marked beta) for all further purposes. This class was generated | |
617 only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0.""" | |
618 """FileService exposes the main operations of an Isolate server | |
619 to upload and download blobs. | |
620 """ | |
621 def Contains(self, request, timeout, metadata=None, with_call=False, protoco
l_options=None): | |
622 """Unlike in the native Isolate API, it is not *necessary* to | |
623 call Contains prior to pushing a blob, as Contains does not | |
624 return "upload tickets." The BlobStatus returned by Contains | |
625 will have succeeded = True if all digests were found, and | |
626 false for any other reason (missing blobs, network error, | |
627 etc.) | |
628 """ | |
629 raise NotImplementedError() | |
630 Contains.future = None | |
631 def PushBlobs(self, request_iterator, timeout, metadata=None, with_call=Fals
e, protocol_options=None): | |
632 """PushBlobs can push one or more blobs at a time (serially), | |
633 with each blob transmitted as one or more chunks. At the | |
634 beginning of a new blob, the chunk offset should be zero | |
635 and the digest must be provided. The function returns true | |
636 only if all blobs are successfully received, and returns | |
637 as soon as an error occurs. | |
638 """ | |
639 raise NotImplementedError() | |
640 PushBlobs.future = None | |
641 def FetchBlobs(self, request, timeout, metadata=None, with_call=False, proto
col_options=None): | |
642 """FetchBlobs takes a list of digests and returns them all as | |
643 a stream of BlobChunks. | |
644 """ | |
645 raise NotImplementedError() | |
646 | |
647 | |
648 def beta_create_FileService_server(servicer, pool=None, pool_size=None, defaul
t_timeout=None, maximum_timeout=None): | |
649 """The Beta API is deprecated for 0.15.0 and later. | |
650 | |
651 It is recommended to use the GA API (classes and functions in this | |
652 file not marked beta) for all further purposes. This function was | |
653 generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0""" | |
654 request_deserializers = { | |
655 ('luci.swarming.bot.FileService', 'Contains'): ContainsRequest.FromString, | |
656 ('luci.swarming.bot.FileService', 'FetchBlobs'): FetchBlobsRequest.FromStr
ing, | |
657 ('luci.swarming.bot.FileService', 'PushBlobs'): PushBlobsRequest.FromStrin
g, | |
658 } | |
659 response_serializers = { | |
660 ('luci.swarming.bot.FileService', 'Contains'): ContainsReply.SerializeToSt
ring, | |
661 ('luci.swarming.bot.FileService', 'FetchBlobs'): FetchBlobsReply.Serialize
ToString, | |
662 ('luci.swarming.bot.FileService', 'PushBlobs'): PushBlobsReply.SerializeTo
String, | |
663 } | |
664 method_implementations = { | |
665 ('luci.swarming.bot.FileService', 'Contains'): face_utilities.unary_unary_
inline(servicer.Contains), | |
666 ('luci.swarming.bot.FileService', 'FetchBlobs'): face_utilities.unary_stre
am_inline(servicer.FetchBlobs), | |
667 ('luci.swarming.bot.FileService', 'PushBlobs'): face_utilities.stream_unar
y_inline(servicer.PushBlobs), | |
668 } | |
669 server_options = beta_implementations.server_options(request_deserializers=r
equest_deserializers, response_serializers=response_serializers, thread_pool=poo
l, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=
maximum_timeout) | |
670 return beta_implementations.server(method_implementations, options=server_op
tions) | |
671 | |
672 | |
673 def beta_create_FileService_stub(channel, host=None, metadata_transformer=None
, pool=None, pool_size=None): | |
674 """The Beta API is deprecated for 0.15.0 and later. | |
675 | |
676 It is recommended to use the GA API (classes and functions in this | |
677 file not marked beta) for all further purposes. This function was | |
678 generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0""" | |
679 request_serializers = { | |
680 ('luci.swarming.bot.FileService', 'Contains'): ContainsRequest.SerializeTo
String, | |
681 ('luci.swarming.bot.FileService', 'FetchBlobs'): FetchBlobsRequest.Seriali
zeToString, | |
682 ('luci.swarming.bot.FileService', 'PushBlobs'): PushBlobsRequest.Serialize
ToString, | |
683 } | |
684 response_deserializers = { | |
685 ('luci.swarming.bot.FileService', 'Contains'): ContainsReply.FromString, | |
686 ('luci.swarming.bot.FileService', 'FetchBlobs'): FetchBlobsReply.FromStrin
g, | |
687 ('luci.swarming.bot.FileService', 'PushBlobs'): PushBlobsReply.FromString, | |
688 } | |
689 cardinalities = { | |
690 'Contains': cardinality.Cardinality.UNARY_UNARY, | |
691 'FetchBlobs': cardinality.Cardinality.UNARY_STREAM, | |
692 'PushBlobs': cardinality.Cardinality.STREAM_UNARY, | |
693 } | |
694 stub_options = beta_implementations.stub_options(host=host, metadata_transfo
rmer=metadata_transformer, request_serializers=request_serializers, response_des
erializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size) | |
695 return beta_implementations.dynamic_stub(channel, 'luci.swarming.bot.FileSer
vice', cardinalities, options=stub_options) | |
696 except ImportError: | |
697 pass | |
698 # @@protoc_insertion_point(module_scope) | |
OLD | NEW |