| Crates.io | lol-core |
| lib.rs | lol-core |
| version | 0.9.5 |
| created_at | 2020-09-15 11:33:33.796649+00 |
| updated_at | 2022-12-08 11:40:42.332581+00 |
| description | A Raft implementation in Rust language. |
| homepage | |
| repository | https://github.com/akiradeveloper/lol |
| max_upload_size | |
| id | 288971 |
| size | 190,732 |
A Raft implementation in Rust language. To support this project please give it a ⭐

Add this to your Cargo.toml.
[dependencies]
lol-core = "0.9"
Available feature flags:
simple: Enables SimpleRaftApp.gateway: Enables Gateway to interact with the cluster.rocksdb-backend: Enables RocksDB-backed RaftStorage.// Implement RaftApp for YourApp!
struct YourApp { ... }
impl RaftApp for YourApp {
...
}
// Initialize your app.
let app = YourApp { ... };
// Choose a backend.
let storage = storage::memory::Storage::new();
// This is the Id of this node.
let uri = "https://192.168.10.15:50000".parse().unwrap();
let config = ConfigBuilder::default().build().unwrap();
// Make a tower::Service.
let service = make_raft_service(app, storage, uri, config);
// Start a gRPC server with the service.
tonic::transport::Server::builder()
.add_service(service)
.serve(socket).await;
Use docker container to make an dev environment on your computer.
make to build the docker image./dev to start the dev containerthen
cargo build to compile the entire projectmake test to run the regression testsmake bench to run the benchmark tests