mirror of https://github.com/ledisdb/ledisdb.git
update read me
This commit is contained in:
parent
8592324a2f
commit
a7f91cfdc9
30
README.md
30
README.md
|
@ -33,14 +33,40 @@ Ledisdb is a high performance nosql like redis based on leveldb written by go. I
|
|||
|
||||
./ledis-server -config=/etc/ledis.json
|
||||
|
||||
//another shell
|
||||
redis-cli -p 6380
|
||||
|
||||
redis 127.0.0.1:6380> set a 1
|
||||
OK
|
||||
redis 127.0.0.1:6380> get a
|
||||
"1"
|
||||
|
||||
## Lib
|
||||
|
||||
import "github.com/siddontang/ledisdb/ledis"
|
||||
l, _ := ledis.OpenWithConfig(cfg)
|
||||
db, _ := l.Select(0)
|
||||
|
||||
db.Set(key, value)
|
||||
|
||||
db.Get(key)
|
||||
|
||||
|
||||
## Replication
|
||||
|
||||
set slaveof in config or dynamiclly
|
||||
|
||||
redis-cli -p 6381
|
||||
|
||||
redis 127.0.0.1:6381> slaveof 127.0.0.1:6380
|
||||
OK
|
||||
|
||||
## Benchmark
|
||||
|
||||
See benchmark.md for more.
|
||||
|
||||
## Todo
|
||||
|
||||
+ Expire + TTL
|
||||
+ Replication
|
||||
+ Admin
|
||||
|
||||
## Feedback
|
||||
|
|
29
README_CN.md
29
README_CN.md
|
@ -40,14 +40,39 @@ ledisdb是一个用go实现的类似redis的高性能nosql数据库,底层基
|
|||
|
||||
./ledis-server -config=/etc/ledis.json
|
||||
|
||||
//another shell
|
||||
redis-cli -p 6380
|
||||
|
||||
redis 127.0.0.1:6380> set a 1
|
||||
OK
|
||||
redis 127.0.0.1:6380> get a
|
||||
"1"
|
||||
|
||||
## 嵌入库
|
||||
|
||||
import "github.com/siddontang/ledisdb/ledis"
|
||||
l, _ := ledis.OpenWithConfig(cfg)
|
||||
db, _ := l.Select(0)
|
||||
|
||||
db.Set(key, value)
|
||||
|
||||
db.Get(key)
|
||||
|
||||
## Benchmark
|
||||
|
||||
可以通过查看benchmark.md获取最新的性能测试结果
|
||||
|
||||
## Replication
|
||||
|
||||
通过配置或者运行时输入slaveof开启slave的replication功能
|
||||
|
||||
redis-cli -p 6381
|
||||
|
||||
redis 127.0.0.1:6381> slaveof 127.0.0.1:6380
|
||||
OK
|
||||
|
||||
## Todo
|
||||
|
||||
+ Expire + TTL
|
||||
+ Replication
|
||||
+ Admin
|
||||
|
||||
## 联系我
|
||||
|
|
Loading…
Reference in New Issue