-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
375 additions
and
36 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
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,99 @@ | ||
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! | ||
"""Client and server classes corresponding to protobuf-defined services.""" | ||
import grpc | ||
|
||
import zookeeper_pb2 as zookeeper__pb2 | ||
|
||
|
||
class ZookeeperStub(object): | ||
"""Missing associated documentation comment in .proto file.""" | ||
|
||
def __init__(self, channel): | ||
"""Constructor. | ||
Args: | ||
channel: A grpc.Channel. | ||
""" | ||
self.Ack = channel.unary_unary( | ||
'/Zookeeper/Ack', | ||
request_serializer=zookeeper__pb2.Empty.SerializeToString, | ||
response_deserializer=zookeeper__pb2.Empty.FromString, | ||
) | ||
self.Register = channel.unary_unary( | ||
'/Zookeeper/Register', | ||
request_serializer=zookeeper__pb2.ReplicaRequest.SerializeToString, | ||
response_deserializer=zookeeper__pb2.Empty.FromString, | ||
) | ||
|
||
|
||
class ZookeeperServicer(object): | ||
"""Missing associated documentation comment in .proto file.""" | ||
|
||
def Ack(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 Register(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_ZookeeperServicer_to_server(servicer, server): | ||
rpc_method_handlers = { | ||
'Ack': grpc.unary_unary_rpc_method_handler( | ||
servicer.Ack, | ||
request_deserializer=zookeeper__pb2.Empty.FromString, | ||
response_serializer=zookeeper__pb2.Empty.SerializeToString, | ||
), | ||
'Register': grpc.unary_unary_rpc_method_handler( | ||
servicer.Register, | ||
request_deserializer=zookeeper__pb2.ReplicaRequest.FromString, | ||
response_serializer=zookeeper__pb2.Empty.SerializeToString, | ||
), | ||
} | ||
generic_handler = grpc.method_handlers_generic_handler( | ||
'Zookeeper', rpc_method_handlers) | ||
server.add_generic_rpc_handlers((generic_handler,)) | ||
|
||
|
||
# This class is part of an EXPERIMENTAL API. | ||
class Zookeeper(object): | ||
"""Missing associated documentation comment in .proto file.""" | ||
|
||
@staticmethod | ||
def Ack(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, '/Zookeeper/Ack', | ||
zookeeper__pb2.Empty.SerializeToString, | ||
zookeeper__pb2.Empty.FromString, | ||
options, channel_credentials, | ||
insecure, call_credentials, compression, wait_for_ready, timeout, metadata) | ||
|
||
@staticmethod | ||
def Register(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, '/Zookeeper/Register', | ||
zookeeper__pb2.ReplicaRequest.SerializeToString, | ||
zookeeper__pb2.Empty.FromString, | ||
options, channel_credentials, | ||
insecure, call_credentials, compression, wait_for_ready, timeout, metadata) |
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
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,14 @@ | ||
syntax = "proto3"; | ||
|
||
message ReplicaRequest { | ||
string uuid = 1; | ||
string url = 2; | ||
} | ||
|
||
message Empty {} | ||
|
||
service Zookeeper { | ||
rpc Ack(Empty) returns (Empty) {} | ||
|
||
rpc Register(ReplicaRequest) returns (Empty) {} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.