Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Unified Diff: client/proto/isolate_bot_pb2_grpc.py

Issue 2953253003: Replace custom blob gRPC API with ByteStream (Closed)
Patch Set: Import ndb directly to test code Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/proto/isolate_bot_pb2.py ('k') | client/tests/isolate_storage_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/proto/isolate_bot_pb2_grpc.py
diff --git a/client/proto/isolate_bot_pb2_grpc.py b/client/proto/isolate_bot_pb2_grpc.py
deleted file mode 100644
index 5acc286508bb0bab335660417d438fb990842b16..0000000000000000000000000000000000000000
--- a/client/proto/isolate_bot_pb2_grpc.py
+++ /dev/null
@@ -1,95 +0,0 @@
-# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
-import grpc
-from grpc.framework.common import cardinality
-from grpc.framework.interfaces.face import utilities as face_utilities
-
-import isolate_bot_pb2 as isolate__bot__pb2
-
-
-class FileServiceStub(object):
- """FileService exposes the main operations of an Isolate server
- to upload and download blobs.
- """
-
- def __init__(self, channel):
- """Constructor.
-
- Args:
- channel: A grpc.Channel.
- """
- self.Contains = channel.unary_unary(
- '/luci.swarming.bot.FileService/Contains',
- request_serializer=isolate__bot__pb2.ContainsRequest.SerializeToString,
- response_deserializer=isolate__bot__pb2.ContainsReply.FromString,
- )
- self.PushBlobs = channel.stream_unary(
- '/luci.swarming.bot.FileService/PushBlobs',
- request_serializer=isolate__bot__pb2.PushBlobsRequest.SerializeToString,
- response_deserializer=isolate__bot__pb2.PushBlobsReply.FromString,
- )
- self.FetchBlobs = channel.unary_stream(
- '/luci.swarming.bot.FileService/FetchBlobs',
- request_serializer=isolate__bot__pb2.FetchBlobsRequest.SerializeToString,
- response_deserializer=isolate__bot__pb2.FetchBlobsReply.FromString,
- )
-
-
-class FileServiceServicer(object):
- """FileService exposes the main operations of an Isolate server
- to upload and download blobs.
- """
-
- def Contains(self, request, context):
- """Unlike in the native Isolate API, it is not *necessary* to
- call Contains prior to pushing a blob, as Contains does not
- return "upload tickets." The BlobStatus returned by Contains
- will have succeeded = True if all digests were found, and
- false for any other reason (missing blobs, network error,
- etc.)
- """
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def PushBlobs(self, request_iterator, context):
- """PushBlobs can push one or more blobs at a time (serially),
- with each blob transmitted as one or more chunks. At the
- beginning of a new blob, the chunk offset should be zero
- and the digest must be provided. The function returns true
- only if all blobs are successfully received, and returns
- as soon as an error occurs.
- """
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def FetchBlobs(self, request, context):
- """FetchBlobs takes a list of digests and returns them all as
- a stream of BlobChunks.
- """
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
-
-def add_FileServiceServicer_to_server(servicer, server):
- rpc_method_handlers = {
- 'Contains': grpc.unary_unary_rpc_method_handler(
- servicer.Contains,
- request_deserializer=isolate__bot__pb2.ContainsRequest.FromString,
- response_serializer=isolate__bot__pb2.ContainsReply.SerializeToString,
- ),
- 'PushBlobs': grpc.stream_unary_rpc_method_handler(
- servicer.PushBlobs,
- request_deserializer=isolate__bot__pb2.PushBlobsRequest.FromString,
- response_serializer=isolate__bot__pb2.PushBlobsReply.SerializeToString,
- ),
- 'FetchBlobs': grpc.unary_stream_rpc_method_handler(
- servicer.FetchBlobs,
- request_deserializer=isolate__bot__pb2.FetchBlobsRequest.FromString,
- response_serializer=isolate__bot__pb2.FetchBlobsReply.SerializeToString,
- ),
- }
- generic_handler = grpc.method_handlers_generic_handler(
- 'luci.swarming.bot.FileService', rpc_method_handlers)
- server.add_generic_rpc_handlers((generic_handler,))
« no previous file with comments | « client/proto/isolate_bot_pb2.py ('k') | client/tests/isolate_storage_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698