-
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.
Update [vald sha: 702e85153e90cdfea37c857e6f3a5cfd56755afa]
Signed-off-by: Vdaas CI <[email protected]>
- Loading branch information
Showing
2 changed files
with
168 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,125 @@ | ||
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! | ||
"""Client and server classes corresponding to protobuf-defined services.""" | ||
import grpc | ||
|
||
from vald.v1.payload import payload_pb2 as vald_dot_v1_dot_payload_dot_payload__pb2 | ||
|
||
|
||
class IndexStub(object): | ||
"""Represent the index manager service. | ||
""" | ||
|
||
def __init__(self, channel): | ||
"""Constructor. | ||
Args: | ||
channel: A grpc.Channel. | ||
""" | ||
self.IndexInfo = channel.unary_unary( | ||
'/vald.v1.Index/IndexInfo', | ||
request_serializer=vald_dot_v1_dot_payload_dot_payload__pb2.Empty.SerializeToString, | ||
response_deserializer=vald_dot_v1_dot_payload_dot_payload__pb2.Info.Index.Count.FromString, | ||
_registered_method=True) | ||
self.IndexDetail = channel.unary_unary( | ||
'/vald.v1.Index/IndexDetail', | ||
request_serializer=vald_dot_v1_dot_payload_dot_payload__pb2.Empty.SerializeToString, | ||
response_deserializer=vald_dot_v1_dot_payload_dot_payload__pb2.Info.Index.Detail.FromString, | ||
_registered_method=True) | ||
|
||
|
||
class IndexServicer(object): | ||
"""Represent the index manager service. | ||
""" | ||
|
||
def IndexInfo(self, request, context): | ||
"""Represent the RPC to get the index information. | ||
""" | ||
context.set_code(grpc.StatusCode.UNIMPLEMENTED) | ||
context.set_details('Method not implemented!') | ||
raise NotImplementedError('Method not implemented!') | ||
|
||
def IndexDetail(self, request, context): | ||
"""Represent the RPC to get the index information for each agents. | ||
""" | ||
context.set_code(grpc.StatusCode.UNIMPLEMENTED) | ||
context.set_details('Method not implemented!') | ||
raise NotImplementedError('Method not implemented!') | ||
|
||
|
||
def add_IndexServicer_to_server(servicer, server): | ||
rpc_method_handlers = { | ||
'IndexInfo': grpc.unary_unary_rpc_method_handler( | ||
servicer.IndexInfo, | ||
request_deserializer=vald_dot_v1_dot_payload_dot_payload__pb2.Empty.FromString, | ||
response_serializer=vald_dot_v1_dot_payload_dot_payload__pb2.Info.Index.Count.SerializeToString, | ||
), | ||
'IndexDetail': grpc.unary_unary_rpc_method_handler( | ||
servicer.IndexDetail, | ||
request_deserializer=vald_dot_v1_dot_payload_dot_payload__pb2.Empty.FromString, | ||
response_serializer=vald_dot_v1_dot_payload_dot_payload__pb2.Info.Index.Detail.SerializeToString, | ||
), | ||
} | ||
generic_handler = grpc.method_handlers_generic_handler( | ||
'vald.v1.Index', rpc_method_handlers) | ||
server.add_generic_rpc_handlers((generic_handler,)) | ||
server.add_registered_method_handlers('vald.v1.Index', rpc_method_handlers) | ||
|
||
|
||
# This class is part of an EXPERIMENTAL API. | ||
class Index(object): | ||
"""Represent the index manager service. | ||
""" | ||
|
||
@staticmethod | ||
def IndexInfo(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, | ||
'/vald.v1.Index/IndexInfo', | ||
vald_dot_v1_dot_payload_dot_payload__pb2.Empty.SerializeToString, | ||
vald_dot_v1_dot_payload_dot_payload__pb2.Info.Index.Count.FromString, | ||
options, | ||
channel_credentials, | ||
insecure, | ||
call_credentials, | ||
compression, | ||
wait_for_ready, | ||
timeout, | ||
metadata, | ||
_registered_method=True) | ||
|
||
@staticmethod | ||
def IndexDetail(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, | ||
'/vald.v1.Index/IndexDetail', | ||
vald_dot_v1_dot_payload_dot_payload__pb2.Empty.SerializeToString, | ||
vald_dot_v1_dot_payload_dot_payload__pb2.Info.Index.Detail.FromString, | ||
options, | ||
channel_credentials, | ||
insecure, | ||
call_credentials, | ||
compression, | ||
wait_for_ready, | ||
timeout, | ||
metadata, | ||
_registered_method=True) |