forked from mirror/ledisdb
update doc
This commit is contained in:
parent
31e70ccd02
commit
d85d65d0f2
|
@ -3,6 +3,8 @@
|
||||||
//
|
//
|
||||||
// Other features include binlog replication, data with a limited time-to-live.
|
// Other features include binlog replication, data with a limited time-to-live.
|
||||||
//
|
//
|
||||||
|
// Usage
|
||||||
|
//
|
||||||
// First create a ledis instance before use:
|
// First create a ledis instance before use:
|
||||||
//
|
//
|
||||||
// l := ledis.OpenWithConfig(cfg)
|
// l := ledis.OpenWithConfig(cfg)
|
||||||
|
@ -52,5 +54,7 @@
|
||||||
// ay, err := db.ZRangeByScore(key, minScore, maxScore, 0, -1)
|
// ay, err := db.ZRangeByScore(key, minScore, maxScore, 0, -1)
|
||||||
//
|
//
|
||||||
// Binlog
|
// Binlog
|
||||||
|
//
|
||||||
// ledis supports binlog, so you can sync binlog to another server for replication. If you want to open binlog support, set UseBinLog to true in config.
|
// ledis supports binlog, so you can sync binlog to another server for replication. If you want to open binlog support, set UseBinLog to true in config.
|
||||||
|
//
|
||||||
package ledis
|
package ledis
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
// You can use ledis with many available redis clients directly, for example, redis-cli.
|
// You can use ledis with many available redis clients directly, for example, redis-cli.
|
||||||
// But I also supply some ledis client at client folder, and have been adding more for other languages.
|
// But I also supply some ledis client at client folder, and have been adding more for other languages.
|
||||||
//
|
//
|
||||||
|
// Usage
|
||||||
|
//
|
||||||
// Start a ledis server is very simple:
|
// Start a ledis server is very simple:
|
||||||
//
|
//
|
||||||
// cfg := new(Config)
|
// cfg := new(Config)
|
||||||
|
@ -14,6 +16,7 @@
|
||||||
// app.Run()
|
// app.Run()
|
||||||
//
|
//
|
||||||
// Replication
|
// Replication
|
||||||
|
//
|
||||||
// You can start a slave ledis server for replication, open slave is simple too, you can set slaveof in config or run slaveof command in shell.
|
// You can start a slave ledis server for replication, open slave is simple too, you can set slaveof in config or run slaveof command in shell.
|
||||||
//
|
//
|
||||||
// For example, if you start a slave server, and the master server's address is 127.0.0.1:6380, you can start replication in shell:
|
// For example, if you start a slave server, and the master server's address is 127.0.0.1:6380, you can start replication in shell:
|
||||||
|
@ -22,4 +25,5 @@
|
||||||
// ledis 127.0.0.1:6381 > slaveof 127.0.0.1 6380
|
// ledis 127.0.0.1:6381 > slaveof 127.0.0.1 6380
|
||||||
//
|
//
|
||||||
// After you send slaveof command, the slave will start to sync master's binlog and replicate from binlog.
|
// After you send slaveof command, the slave will start to sync master's binlog and replicate from binlog.
|
||||||
|
//
|
||||||
package server
|
package server
|
||||||
|
|
Loading…
Reference in New Issue