Skip to content

Commit 7c93b97

Browse files
authored
Merge pull request #9 from Icingworld/dev
Refactor whole raftkv/ and example/
2 parents fe75966 + 1e45a88 commit 7c93b97

File tree

105 files changed

+11783
-10363
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+11783
-10363
lines changed

example/CMakeLists.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# raft_example
12
set(RAFT_EXAMPLE_SOURCES
23
src/raft_example.cpp
34
)
@@ -9,13 +10,15 @@ target_include_directories(raft_example PRIVATE
910
)
1011

1112
target_link_libraries(raft_example PRIVATE
12-
WW::raft
13+
WW::raftkv
1314
)
1415

16+
# raft_client
1517
set(CLIENT_SOURCES
1618
src/client_channel.cpp
1719
src/raft_client.cpp
18-
src/RaftOperation.pb.cc
20+
src/KVOperation.pb.cc
21+
src/uuid.cpp
1922
)
2023

2124
add_executable(raft_client ${CLIENT_SOURCES})
@@ -25,9 +28,10 @@ target_include_directories(raft_client PRIVATE
2528
)
2629

2730
target_link_libraries(raft_client PRIVATE
28-
WW::raft
31+
WW::raftkv
2932
third-party
3033
)
3134

3235
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/run.sh ${CMAKE_CURRENT_BINARY_DIR}/run.sh COPYONLY)
3336
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/stop.sh ${CMAKE_CURRENT_BINARY_DIR}/stop.sh COPYONLY)
37+
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/clean.sh ${CMAKE_CURRENT_BINARY_DIR}/clean.sh COPYONLY)

example/clean.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
rm raftnode_*.persist
4+
rm snapshot_*.snapshot
5+
rm logs/node_*.log

0 commit comments

Comments
 (0)