Rich advanced data structure: KV, List, Hash, ZSet, Bitmap.
Various backend databases to choose:
LevelDB, goleveldb, LMDB, RocksDB or BoltDB.
Supports expiration and ttl in all kinds of data structures.
Redis clients, like redis-cli, are supported directly.
Multiple clients API supports, including Golang, Python, Lua(Openresty).
Easy to embed in Golang application.
Replication to guarantee data safety.
Supplies tools to load, dump, and repair database.
HTTP interfaces, can be directly accessed by HTTP Clients.
Supplies json、bson、msgpack as request content-type.
./ledis-server -config=/etc/ledis.json
//another shell
ledis-cli -p 6380
ledis 127.0.0.1:6380> set a 1
OK
ledis 127.0.0.1:6380> get a
"1"
//use curl
curl http://127.0.0.1:11181/SET/hello/world
→ {"SET":[true,"OK"]}
curl http://127.0.0.1:11181/0/GET/hello?type=json
→ {"GET":"world"}
import "github.com/siddontang/ledisdb/ledis"
l, _ := ledis.Open(cfg)
db, _ := l.Select(0)
db.Set(key, value)
db.Get(key)