-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add README.md directory and plugin docs example
Signed-off-by: yutao04 <[email protected]>
- Loading branch information
Showing
9 changed files
with
83 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,12 @@ | ||
[//]: # (TODO) | ||
# Docs | ||
# Hango 文档 | ||
|
||
## 插件 | ||
|
||
* [插件界面配置引导](plugin/plugin-configuring-guide.md) | ||
|
||
* [percent-limit](plugin/percent-limit.md) | ||
|
||
## 问题定位 | ||
|
||
* [问题定位引导](troubleshooting/troubleshooting.md) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# 百分比限流 | ||
|
||
## 描述 | ||
|
||
`percent-limit`插件可以对网关流量基于百分比粒度进行限流 | ||
|
||
## 属性 | ||
|
||
| 名称 | 类型 | 必选项 | 默认值 | 描述 | | ||
|-------|--------|-----|-----|------------| | ||
| 限流百分比 | number | 是 | - | 允许通过流量的百分比 | | ||
|
||
|
||
## 前置条件 | ||
|
||
以下curl命令中存在变量,使用前需要替换为真实环境数据,变量以`{{}}`符号包裹,例如`{{ 网关ID }}`需要根据网关的实际ID进行替换 | ||
|
||
## 创建 | ||
|
||
```shell | ||
curl -XPOST -v -H "Content-Type:application/json" -d '{ | ||
"BindingObjectId": {{ 路由ID }}, | ||
"BindingObjectType": "routeRule", | ||
"GwId": {{ 网关ID }}, | ||
"PluginConfiguration": "{\"limit_percent\":\"50\",\"kind\":\"percent-limit\"}", | ||
"PluginType": "percent-limit" | ||
}' http://{{ 网关gportal域名 }}/gdashboard?Action=BindingPlugin&Version=2019-09-01 | ||
``` | ||
|
||
## 测试 | ||
|
||
```shell | ||
## 通过脚本多次调用以下curl命令,测试网关百分比限流效果 | ||
curl -v "http://{{ 网关IP }}/{{ 路由path }}" -H "host:{{ 网关关联域名 }}" | ||
``` | ||
|
||
## 删除 | ||
|
||
```shell | ||
curl -v -H "Content-Type:application/json" http://{{ 网关gportal域名 }}/gdashboard?PluginBindingInfoId={{ 插件ID }}&Action=UnbindingPlugin&Version=2019-09-01 | ||
``` | ||
|
||
## 界面配置方法 | ||
|
||
[插件界面配置方法引导](plugin-configuring-guide.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# 插件配置方法 | ||
|
||
1.通过Hango主页左侧Tab栏中的`插件管理`进入插件配置主页 | ||
|
||
![plugin_entry](img/plugin_readme_entry.png) | ||
|
||
2.点击`+`符号添加插件,选择指定的路由为其配置某款插件 | ||
|
||
![plugin_route.png](img/plugin_readme_route.png) | ||
|
||
3.选择路由后界面将展示可配置的插件列表 | ||
|
||
![plugin_list](img/plugin_readme_list.png) | ||
|
||
4.选择需要配置的插件后将展示该插件的具体配置页面(案例为百分比限流插件),正确配置后点击`确认`按钮即可完成插件配置 | ||
|
||
![plugin_example.png](img/plugin_readme_example.png) | ||
|
||
5.完成插件配置后,插件界面将展示插件信息及其相关操作,后续可以通过`操作栏`对该插件进行`更新`或`删除` | ||
|
||
![plugin_success.png](img/plugin_readme_success.png) |