Add 'car/' from commit 'eee0e8dc445691e600680f4abc77f2814b20b054'
git-subtree-dir: car git-subtree-mainline:1d29a5526cgit-subtree-split:eee0e8dc44
This commit is contained in:
63
car/MyRaft/raft_pb2_grpc.py
Normal file
63
car/MyRaft/raft_pb2_grpc.py
Normal file
@@ -0,0 +1,63 @@
|
||||
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
||||
import grpc
|
||||
|
||||
import MyRaft.raft_pb2 as raft__pb2
|
||||
|
||||
|
||||
class RaftStub(object):
|
||||
# missing associated documentation comment in .proto file
|
||||
pass
|
||||
|
||||
def __init__(self, channel):
|
||||
"""Constructor.
|
||||
|
||||
Args:
|
||||
channel: A grpc.Channel.
|
||||
"""
|
||||
self.AppendEntriesRPC = channel.unary_unary(
|
||||
'/raft.Raft/AppendEntriesRPC',
|
||||
request_serializer=raft__pb2.AppendEntries.SerializeToString,
|
||||
response_deserializer=raft__pb2.AppendEntriesResponse.FromString,
|
||||
)
|
||||
self.RequestVoteRPC = channel.unary_unary(
|
||||
'/raft.Raft/RequestVoteRPC',
|
||||
request_serializer=raft__pb2.RequestVote.SerializeToString,
|
||||
response_deserializer=raft__pb2.RequestVoteResponse.FromString,
|
||||
)
|
||||
|
||||
|
||||
class RaftServicer(object):
|
||||
# missing associated documentation comment in .proto file
|
||||
pass
|
||||
|
||||
def AppendEntriesRPC(self, request, context):
|
||||
# missing associated documentation comment in .proto file
|
||||
pass
|
||||
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
||||
context.set_details('Method not implemented!')
|
||||
raise NotImplementedError('Method not implemented!')
|
||||
|
||||
def RequestVoteRPC(self, request, context):
|
||||
# missing associated documentation comment in .proto file
|
||||
pass
|
||||
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
||||
context.set_details('Method not implemented!')
|
||||
raise NotImplementedError('Method not implemented!')
|
||||
|
||||
|
||||
def add_RaftServicer_to_server(servicer, server):
|
||||
rpc_method_handlers = {
|
||||
'AppendEntriesRPC': grpc.unary_unary_rpc_method_handler(
|
||||
servicer.AppendEntriesRPC,
|
||||
request_deserializer=raft__pb2.AppendEntries.FromString,
|
||||
response_serializer=raft__pb2.AppendEntriesResponse.SerializeToString,
|
||||
),
|
||||
'RequestVoteRPC': grpc.unary_unary_rpc_method_handler(
|
||||
servicer.RequestVoteRPC,
|
||||
request_deserializer=raft__pb2.RequestVote.FromString,
|
||||
response_serializer=raft__pb2.RequestVoteResponse.SerializeToString,
|
||||
),
|
||||
}
|
||||
generic_handler = grpc.method_handlers_generic_handler(
|
||||
'raft.Raft', rpc_method_handlers)
|
||||
server.add_generic_rpc_handlers((generic_handler,))
|
||||
Reference in New Issue
Block a user