Skip to content

Commit

Permalink
Merge pull request #58 from ikenchina/dev/doc3
Browse files Browse the repository at this point in the history
update doc
  • Loading branch information
ikenchina authored Sep 13, 2024
2 parents 7b686f7 + 9d620bb commit e5ac9bb
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/API_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ If command is sync, `redisGunYu` supports below APIs.
- [Sync Status Information](#sync-status-information)
- [Sync Configuration Information](#sync-configuration-information)
- [Full Sync](#full-sync)
- [Hand over leadership](#hand-over-leadership)
- [Recycle Local Cache](#recycle-local-cache)
- [Observability](#observability)
- [Prometheus Metrics API](#prometheus-metrics-api)
Expand Down Expand Up @@ -136,6 +137,19 @@ curl -XPOST 'http://http_server:port/syncer/fullsync?inputs=127.0.0.1:16302,127.



### Hand over leadership

You can use this API to transfer synchronization responsibility(leadership) from one `redisGunYu` node to another when `redisGunYu` is deployed in cluster mode.

```
curl -XPOST 'http://http_server:port/syncer/handover?inputs=inputs'
```
URL, query parameters:
- inputs: The source Redis IP and port that need to be fully synchronized. If all source nodes need to be fully synchronized, write "inputs=all". If there are multiple source IP+port, separate them with commas. The specific IP+port can be obtained through the `http://http_server:port/syncer/status` API.




## Recycle Local Cache

GET http://http_server:port/storage/gc
Expand Down
14 changes: 14 additions & 0 deletions docs/API_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ API只在sync命令(实时同步)下有效。
- [同步状态信息](#同步状态信息)
- [同步配置信息](#同步配置信息)
- [强制全量同步](#强制全量同步)
- [转移同步节点](#转移同步节点)
- [回收本地缓存](#回收本地缓存)
- [可观测性](#可观测性)
- [普罗米修斯指标接口](#普罗米修斯指标接口)
Expand Down Expand Up @@ -134,6 +135,19 @@ curl -XPOST 'http://http_server:port/syncer/fullsync?inputs=127.0.0.1:16302,127.



### 转移同步节点

`redisGunYu`是集群模式部署时,若要将某个`redisGunYu`节点负责的同步权转移到其他`redisGunYu`节点,则可以使用`handover` API。
```
curl -XPOST 'http://http_server:port/syncer/handover?inputs=inputs'
```
URL,查询参数:
- inputs : 需要全量同步的源端redis IP和端口,如果所有源端都全量同步,则写成 inputs=all。如果多个源端IP+端口,则用逗号分隔。具体IP+端口可以通过`http://http_server:port/syncer/status`接口获取


当某个`redisGunYu`节点需要下线时,可以使用这个API来将此`redisGunYu`节点的同步权转移到其他节点后,再下线。


## 回收本地缓存

GET http://http_server:port/storage/gc
Expand Down

0 comments on commit e5ac9bb

Please sign in to comment.