-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(fileprocessor): did further cleanup and fixed minor error handlin…
…g bugs
- Loading branch information
Showing
4 changed files
with
103 additions
and
0 deletions.
There are no files selected for viewing
Binary file modified
BIN
-11 Bytes
(99%)
backend/simple/fileprocessor/src/__pycache__/file_processor_pb2.cpython-39.pyc
Binary file not shown.
Binary file modified
BIN
-11 Bytes
(100%)
backend/simple/fileprocessor/src/__pycache__/file_processor_pb2_grpc.cpython-39.pyc
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
69 changes: 69 additions & 0 deletions
69
backend/simple/fileprocessor/src/file_processor_pb2_grpc.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! | ||
"""Client and server classes corresponding to protobuf-defined services.""" | ||
import grpc | ||
|
||
import file_processor_pb2 as file__processor__pb2 | ||
|
||
|
||
class FileProcessorStub(object): | ||
"""Service definition | ||
""" | ||
|
||
def __init__(self, channel): | ||
"""Constructor. | ||
Args: | ||
channel: A grpc.Channel. | ||
""" | ||
self.ProcessFile = channel.unary_unary( | ||
'/fileprocessor.FileProcessor/ProcessFile', | ||
request_serializer=file__processor__pb2.FileUploadRequest.SerializeToString, | ||
response_deserializer=file__processor__pb2.FileProcessResponse.FromString, | ||
) | ||
|
||
|
||
class FileProcessorServicer(object): | ||
"""Service definition | ||
""" | ||
|
||
def ProcessFile(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_FileProcessorServicer_to_server(servicer, server): | ||
rpc_method_handlers = { | ||
'ProcessFile': grpc.unary_unary_rpc_method_handler( | ||
servicer.ProcessFile, | ||
request_deserializer=file__processor__pb2.FileUploadRequest.FromString, | ||
response_serializer=file__processor__pb2.FileProcessResponse.SerializeToString, | ||
), | ||
} | ||
generic_handler = grpc.method_handlers_generic_handler( | ||
'fileprocessor.FileProcessor', rpc_method_handlers) | ||
server.add_generic_rpc_handlers((generic_handler,)) | ||
|
||
|
||
# This class is part of an EXPERIMENTAL API. | ||
class FileProcessor(object): | ||
"""Service definition | ||
""" | ||
|
||
@staticmethod | ||
def ProcessFile(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, '/fileprocessor.FileProcessor/ProcessFile', | ||
file__processor__pb2.FileUploadRequest.SerializeToString, | ||
file__processor__pb2.FileProcessResponse.FromString, | ||
options, channel_credentials, | ||
insecure, call_credentials, compression, wait_for_ready, timeout, metadata) |