directory
Version:
v0.0.0-...-bc5e729
Opens a new window with list of versions in this module.
Published: Dec 9, 2017
License: MPL-2.0
Opens a new window with license information.
README
¶
db
db
contains master and node using raft consensus algorithm.
Master
We only need one master to mantain the system status, so the master only for:
- Wraps the meta data query:
register/get/update
raft peers.
- Send heartbeats to every known node, remove any of them wich down or network partition.
Node
- Every node combines a HTTP server and a Raft instance.
- HTTP server handles serveral API:
GET /i/key/:key
for get the value of the :key
.
POST /key
for add a pair of key and value.
POST /join
for join a peer into the cluster, reject if current raft instance is not a Leader.
GET /ping
for master heartbeat.
GET /stats
for stats of current raft instance.
Directories
¶
|
|
node
|
|
service
Package service provides the HTTP server for accessing the distributed key-value store.
|
Package service provides the HTTP server for accessing the distributed key-value store. |
store
Package store provides a simple distributed key-value store.
|
Package store provides a simple distributed key-value store. |
Click to show internal directories.
Click to hide internal directories.