这是indexloc提供的服务,不要输入任何密码
Skip to content

mosuka/rust-raftkv

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust Raft KV

A very simple example to use Raft in Rust.

Build and Start

make

# You can use goreman or other similar tools like foreman to manage the cluster
# go get github.com/mattn/goreman
goreman start 

Usage

# Get status of a server, we can know the leader from status
curl http://127.0.0.1:20171/status

# Send the request to leader

# Put abc = 124
curl http://127.0.0.1:20173/kv/abc -d 123
# Get abc 
curl http://127.0.0.1:20173/kv/abc
# Delete abc
curl http://127.0.0.1:20173/kv/abc -x DELETE

# Get abc locally, not through Raft 
curl http://127.0.0.1:20173/local_kv/abc

About

A simple distributed consistent key-value store with Raft and Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 99.5%
  • Makefile 0.5%