This crate is aimed to be rust raft implementation, which are a key component of many distributed systems.
This crate guarantee: - There is one and only one leader in any time; - Data are synchronized with leader, but only keep latest items no more than snapshot numbers in initial config. it is user responsibility to fetch and save data from snapshot, to synchronize data out which is not in the scope of current snapshot.
## Quick Start see bin.rs ``` pub mod trans; pub mod raft;
extern crate anyhow;
async fn main() { let conf = raft::raftconf::ConfigRaft::default(); trans::server::initapp(conf); trans::server::runapp(); raft::raftrun::cron_app().await; }
```