engine-consistent-hashing-service

module
v0.0.0-...-233725d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 19, 2020 License: MIT

README

engine-consistent-hashing-service

engine-consistent-hashing-service is designed to provide high available consistent-hashing service, and supported by HA policies (replication + oplog).

Get Started

Prerequisites
  • OS: Linux
  • Golang: v1.12+
Installation
Clone
Setup
# build the binary
make build

# start the service
./engine-consistent-hashing-service --conf=conf/worker.json
Example
# add shard
curl -XPOST -d \
    '{"shard": {"uuid": "192.168.0.11"}, "record": true, "replay": false, "sender": "SENDER_TYPE_CLIENT"}' \
    http://localhost:18181/v1/shard

# list shards
curl http://localhost:18181/v1/shards

# delete shard
curl -XPOST -d \
    '{"uuid": "192.168.0.11", "record": true, "replay": false, "sender": "SENDER_TYPE_CLIENT"}' \
    http://localhost:18181/v1/delshard

# map key
curl -XPOST -d \
    '{"key":{"key": "foo"}, "record": true, "replay": false, "sender": "SENDER_TYPE_CLIENT"}' \
    http://localhost:18181/v1/key

Documentation

Api Design
Reference

Contributing

Step 1
  • 🍴 Fork this repo!
Step 2
  • 🔨 HACK AWAY!
Step 3

Support

License

  • This project is licensed under the MIT License - see the MIT license for details.

Directories

Path Synopsis
Package api is a reverse proxy.
Package api is a reverse proxy.
cmd
internal
ch

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL