mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-12-14 21:06:34 +08:00
增加API注释
This commit is contained in:
33
pkg/rpc/jsons/origin_refs.md
Normal file
33
pkg/rpc/jsons/origin_refs.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# 源站引用列表
|
||||
|
||||
## 定义
|
||||
~~~json
|
||||
[
|
||||
{
|
||||
"isOn": "是否启用",
|
||||
"originId": "源站ID 1"
|
||||
},
|
||||
{
|
||||
"isOn": "是否启用",
|
||||
"originId": "源站ID 2"
|
||||
},
|
||||
...
|
||||
]
|
||||
~~~
|
||||
|
||||
其中:
|
||||
* `originId` - 源站ID,可以通过 `/OriginService/createOrigin` 接口创建源站后获得
|
||||
|
||||
## 示例
|
||||
~~~json
|
||||
[
|
||||
{
|
||||
"isOn": true,
|
||||
"originId": 1
|
||||
},
|
||||
{
|
||||
"isOn": true,
|
||||
"originId": 2,
|
||||
}
|
||||
]
|
||||
~~~
|
||||
19
pkg/rpc/jsons/reverse_proxy_ref.md
Normal file
19
pkg/rpc/jsons/reverse_proxy_ref.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# 反向代理引用
|
||||
## 定义
|
||||
~~~json
|
||||
{
|
||||
"isOn": "是否启用",
|
||||
"isPrior": "是否覆盖上级配置,用于路由规则",
|
||||
"reverseProxyId": "反向代理ID"
|
||||
}
|
||||
~~~
|
||||
其中:
|
||||
* `reverseProxyId` - 反向代理ID,可以通过 `/ReverseProxyService/createReverseProxy` 创建
|
||||
|
||||
## 示例
|
||||
~~~json
|
||||
{
|
||||
"isOn": true,
|
||||
"reverseProxyId": 123
|
||||
}
|
||||
~~~
|
||||
27
pkg/rpc/jsons/scheduling.md
Normal file
27
pkg/rpc/jsons/scheduling.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# 反向代理调度
|
||||
## 定义
|
||||
~~~json
|
||||
{
|
||||
"code": "调度方法代号",
|
||||
"options": "调度选项"
|
||||
}
|
||||
~~~
|
||||
|
||||
其中:
|
||||
* `code` 调度方法代号
|
||||
* `random` - 随机
|
||||
* `roundRobin` - 轮询
|
||||
* `hash` - Hash算法
|
||||
* `key` - 自定义Key,可以使用请求变量,比如 `${remoteAddr}`
|
||||
* `sticky` - Sticky算法
|
||||
* `type` - 类型:cookie、header、argument
|
||||
* `param` - 参数值
|
||||
|
||||
|
||||
## 示例
|
||||
~~~json
|
||||
{
|
||||
"code": "random",
|
||||
"options": null
|
||||
}
|
||||
~~~
|
||||
Reference in New Issue
Block a user