Nuft is an C++17 implementation of the Raft protocol.
- C++17 standard(e.g. g++ 7.2)
- gRPC
- Nuke, which is already packed in source
- gtest(in /usr/local/lib)
Build all tests by
make
Run all tests by
./test
Run all tests until failby(This can be used to debug)
python ./src/test/test_until_fail.py
Some tests maybe fail, I will later revise them.
NuftResult RaftNode::do_log(const std::string & log_string)
NuftResult RaftNode::do_log(raft_messages::LogEntry entry, int command = 0)
void RaftNode::run()
void RaftNode::run(const std::string & new_name)
void RaftNode::stop()
void RaftNode::resume()
NuftResult RaftNode::do_install_snapshot(IndexID last_included_index, const std::string & state_machine_state)
NuftResult RaftNode::update_configuration(const std::vector<std::string> & app, const std::vector<std::string> & rem)
std::string RaftNode::get_leader_name() const
void safe_leave()
Nuft -- A C++17 Raft consensus algorithm library
Copyright (C) 2018 Calvin Neo
Email: calvinneo@calvinneo.com;calvinneo1995@gmail.com
Github: https://github.com/CalvinNeo/Nuft/
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.