Skip to content

Commit

Permalink
Renamed consensus.thrift to raftex.thrift (vesoft-inc#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
sherman-the-tank authored and dutor committed Sep 18, 2018
1 parent 7b2658f commit 809d9b8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 24 deletions.
36 changes: 18 additions & 18 deletions interface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ add_custom_command(

add_custom_command(
OUTPUT
gen-cpp2/ConsensusService.cpp
gen-cpp2/ConsensusService_client.cpp
gen-cpp2/ConsensusService_processmap_binary.cpp
gen-cpp2/ConsensusService_processmap_compact.cpp
gen-cpp2/consensus_constants.cpp
gen-cpp2/consensus_data.cpp
gen-cpp2/consensus_types.cpp
COMMAND "${CMAKE_HOME_DIRECTORY}/third-party/fbthrift/_install/bin/thrift1" "--allow-neg-enum-vals" "--templates" "${CMAKE_HOME_DIRECTORY}/third-party/fbthrift/_install/include/thrift/templates" "--gen" "mstch_cpp2:include_prefix=\"interface\",process_in_event_base,stack_arguments" "--gen" "java:hashcode" "--gen" "go" "--gen" "py:new_style" "-o" "." "./consensus.thrift"
DEPENDS consensus.thrift
gen-cpp2/RaftexService.cpp
gen-cpp2/RaftexService_client.cpp
gen-cpp2/RaftexService_processmap_binary.cpp
gen-cpp2/RaftexService_processmap_compact.cpp
gen-cpp2/raftex_constants.cpp
gen-cpp2/raftex_data.cpp
gen-cpp2/raftex_types.cpp
COMMAND "${CMAKE_HOME_DIRECTORY}/third-party/fbthrift/_install/bin/thrift1" "--allow-neg-enum-vals" "--templates" "${CMAKE_HOME_DIRECTORY}/third-party/fbthrift/_install/include/thrift/templates" "--gen" "mstch_cpp2:include_prefix=\"interface\",process_in_event_base,stack_arguments" "--gen" "java:hashcode" "--gen" "go" "--gen" "py:new_style" "-o" "." "./raftex.thrift"
DEPENDS raftex.thrift
)


Expand All @@ -46,13 +46,13 @@ add_dependencies(vgraph_thrift_obj tgt_fbthrift)


add_library(
consensus_thrift_obj OBJECT
gen-cpp2/ConsensusService.cpp
gen-cpp2/ConsensusService_client.cpp
gen-cpp2/ConsensusService_processmap_binary.cpp
gen-cpp2/ConsensusService_processmap_compact.cpp
gen-cpp2/consensus_constants.cpp
gen-cpp2/consensus_data.cpp
gen-cpp2/consensus_types.cpp
raftex_thrift_obj OBJECT
gen-cpp2/RaftexService.cpp
gen-cpp2/RaftexService_client.cpp
gen-cpp2/RaftexService_processmap_binary.cpp
gen-cpp2/RaftexService_processmap_compact.cpp
gen-cpp2/raftex_constants.cpp
gen-cpp2/raftex_data.cpp
gen-cpp2/raftex_types.cpp
)
add_dependencies(consensus_thrift_obj tgt_fbthrift)
add_dependencies(raftex_thrift_obj tgt_fbthrift)
11 changes: 5 additions & 6 deletions interface/consensus.thrift → interface/raftex.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* (found in the LICENSE.Apache file in the root directory)
*/

namespace cpp vesoft.vgraph.consensus
namespace java vesoft.vgraph.consensus
namespace go vesoft.vgraph.consensus
namespace cpp vesoft.vgraph.raftex
namespace java vesoft.vgraph.raftex
namespace go vesoft.vgraph.raftex


enum ResultCode {
Expand Down Expand Up @@ -42,8 +42,7 @@ typedef i32 Port
// A request to ask for vote
struct AskForVoteRequest {
1: GraphSpaceID space; // My graph space id
2: PartitionID partition; // The data partition that the current
// replica represents
2: PartitionID partition; // The data partition
3: IPv4 candidateIp; // My IP
4: Port candidatePort; // My port
5: TermID term; // Proposed term (current term + 1)
Expand Down Expand Up @@ -108,7 +107,7 @@ struct AppendLogResponse {
}


service ConsensusService {
service RaftexService {
AskForVoteResponse askForVote(1: AskForVoteRequest req);
AppendLogResponse appendLog(1: AppendLogRequest req);
}
Expand Down

0 comments on commit 809d9b8

Please sign in to comment.