Move root car to pycar, put other pycar back to car.
This commit is contained in:
35
pycar/MyRaft/protos/raft.proto
Normal file
35
pycar/MyRaft/protos/raft.proto
Normal file
@@ -0,0 +1,35 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package raft;
|
||||
|
||||
service Raft{
|
||||
rpc AppendEntriesRPC(AppendEntries) returns (AppendEntriesResponse) {}
|
||||
rpc RequestVoteRPC(RequestVote) returns (RequestVoteResponse) {}
|
||||
}
|
||||
|
||||
message AppendEntries{
|
||||
uint32 term = 1;
|
||||
string leaderId = 2;
|
||||
uint32 prevLogIndex = 3;
|
||||
uint32 prevLogTerm = 4;
|
||||
uint32 leaderCommit = 5;
|
||||
repeated string entry = 6;
|
||||
}
|
||||
|
||||
message AppendEntriesResponse{
|
||||
uint32 term = 1;
|
||||
bool success = 2;
|
||||
}
|
||||
|
||||
message RequestVote{
|
||||
uint32 term = 1;
|
||||
string candidateId = 2;
|
||||
uint32 lastLogIndex = 3;
|
||||
uint32 lastLogTerm = 4;
|
||||
}
|
||||
|
||||
message RequestVoteResponse{
|
||||
uint32 term = 1;
|
||||
bool voteGranted = 2;
|
||||
string voterId = 3;
|
||||
}
|
||||
Reference in New Issue
Block a user