Expand description
Raft is a distributed consensus algorithm widely used recently to build distributed applications like etcd. However, while it is even understandable than notorious Paxos algorithm it is still difficult to implement correct and efficient implementation.
This library is a Raft implementation based on Tonic, a gRPC library based on Tokio. By exploiting gRPC features like streaming, the inter-node log replication and snapshot copying is very efficient.
Modules§
- api
- Available message types for interaction with the cluster.
- gateway
gateway
- Gateway to interact with the cluster.
- simple
simple
- Simplified
RaftApp
. - storage
- The abstraction of the log storage and some implementations.
Structs§
- Config
- Configuration.
- Config
Builder - Builder for
Config
. - Raft
Client - Uri
- The URI component of a request.
Enums§
- Config
Builder Error - Error type for ConfigBuilder
- Make
Snapshot - Decision to make a new snapshot.
Traits§
- RaftApp
- The abstraction of user-defined application.
Functions§
- make_
raft_ service - Make a
RaftService
.
Type Aliases§
- Index
- Log entry index.
- Raft
Service - A Raft implementation of
tower::Service
. - Snapshot
Stream - The core-level stream type. It is just a stream of byte chunks. The length of each chunk may be different.