├── .gitignore ├── Cargo.toml ├── LICENSE ├── README.md ├── doc ├── raft-zh_cn.pdf ├── raft.pdf └── 谭新宇-Raft 算法和对应代码框架介绍.pptx ├── examples ├── hello-tonic │ ├── tonic_client.rs │ └── tonic_server.rs └── raft-app │ ├── app_admin.rs │ ├── app_admin_add_server.rs │ ├── app_admin_remove_server.rs │ ├── app_server1.rs │ ├── app_server2.rs │ ├── app_server3.rs │ ├── app_server4.rs │ └── rpc_client.rs ├── proto ├── helloworld.proto └── raft.proto └── src ├── config.rs ├── consensus.rs ├── lib.rs ├── log.rs ├── metadata.rs ├── peer.rs ├── proto.rs ├── rpc.rs ├── snapshot.rs ├── state_machine.rs ├── timer.rs └── util.rs /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemxlabs/raft/HEAD/.gitignore -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemxlabs/raft/HEAD/Cargo.toml -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemxlabs/raft/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemxlabs/raft/HEAD/README.md -------------------------------------------------------------------------------- /doc/raft-zh_cn.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemxlabs/raft/HEAD/doc/raft-zh_cn.pdf -------------------------------------------------------------------------------- /doc/raft.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemxlabs/raft/HEAD/doc/raft.pdf -------------------------------------------------------------------------------- /doc/谭新宇-Raft 算法和对应代码框架介绍.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemxlabs/raft/HEAD/doc/谭新宇-Raft 算法和对应代码框架介绍.pptx -------------------------------------------------------------------------------- /examples/hello-tonic/tonic_client.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemxlabs/raft/HEAD/examples/hello-tonic/tonic_client.rs -------------------------------------------------------------------------------- /examples/hello-tonic/tonic_server.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemxlabs/raft/HEAD/examples/hello-tonic/tonic_server.rs -------------------------------------------------------------------------------- /examples/raft-app/app_admin.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemxlabs/raft/HEAD/examples/raft-app/app_admin.rs -------------------------------------------------------------------------------- /examples/raft-app/app_admin_add_server.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemxlabs/raft/HEAD/examples/raft-app/app_admin_add_server.rs -------------------------------------------------------------------------------- /examples/raft-app/app_admin_remove_server.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemxlabs/raft/HEAD/examples/raft-app/app_admin_remove_server.rs -------------------------------------------------------------------------------- /examples/raft-app/app_server1.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemxlabs/raft/HEAD/examples/raft-app/app_server1.rs -------------------------------------------------------------------------------- /examples/raft-app/app_server2.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemxlabs/raft/HEAD/examples/raft-app/app_server2.rs -------------------------------------------------------------------------------- /examples/raft-app/app_server3.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemxlabs/raft/HEAD/examples/raft-app/app_server3.rs -------------------------------------------------------------------------------- /examples/raft-app/app_server4.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemxlabs/raft/HEAD/examples/raft-app/app_server4.rs -------------------------------------------------------------------------------- /examples/raft-app/rpc_client.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemxlabs/raft/HEAD/examples/raft-app/rpc_client.rs -------------------------------------------------------------------------------- /proto/helloworld.proto: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemxlabs/raft/HEAD/proto/helloworld.proto -------------------------------------------------------------------------------- /proto/raft.proto: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemxlabs/raft/HEAD/proto/raft.proto -------------------------------------------------------------------------------- /src/config.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemxlabs/raft/HEAD/src/config.rs -------------------------------------------------------------------------------- /src/consensus.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemxlabs/raft/HEAD/src/consensus.rs -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemxlabs/raft/HEAD/src/lib.rs -------------------------------------------------------------------------------- /src/log.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemxlabs/raft/HEAD/src/log.rs -------------------------------------------------------------------------------- /src/metadata.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemxlabs/raft/HEAD/src/metadata.rs -------------------------------------------------------------------------------- /src/peer.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemxlabs/raft/HEAD/src/peer.rs -------------------------------------------------------------------------------- /src/proto.rs: -------------------------------------------------------------------------------- 1 | tonic::include_proto!("raft"); 2 | -------------------------------------------------------------------------------- /src/rpc.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemxlabs/raft/HEAD/src/rpc.rs -------------------------------------------------------------------------------- /src/snapshot.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemxlabs/raft/HEAD/src/snapshot.rs -------------------------------------------------------------------------------- /src/state_machine.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemxlabs/raft/HEAD/src/state_machine.rs -------------------------------------------------------------------------------- /src/timer.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemxlabs/raft/HEAD/src/timer.rs -------------------------------------------------------------------------------- /src/util.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemxlabs/raft/HEAD/src/util.rs --------------------------------------------------------------------------------