LedisDB

LedisDB

A high performance NoSQL like Redis powered by Go.

Data Structure

Rich data structure: KV, List, Hash, ZSet, Set.

Various Backend

Various backend databases to choose:

LevelDB, goleveldb, LMDB, RocksDB, BoltDB or Memory.

Expiration & TTL

Supports expiration and ttl in all kinds of data structures.

CLI Support

Redis clients, like redis-cli, are supported directly.

Easy Embedding

Easy to embed in Go application.

Data Protection

Replication to guarantee data safety.

Useful Tools

Supplies tools to load, dump, and repair database.

HTTP API

HTTP interfaces, can be directly accessed by HTTP Clients.

Supplies json、bson、msgpack as request content-type.

The HTTP API is used to communicate with the HTTP protocol.

CLI Example


./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"
        

RESTful Example


//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"}
        

Lib Example


import "github.com/siddontang/ledisdb/ledis"
l, _ := ledis.Open(cfg)
db, _ := l.Select(0)

db.Set(key, value)

db.Get(key)
          

Benchmark


For more information, please take a look at .

copyright@2024 ledisdb.comAll rights reserved