docs: add create/update_time fields (#2712)

Close #2654
This commit is contained in:
罗泽轩 2020-11-13 00:23:49 +08:00 committed by GitHub
parent 39879630ae
commit 2f8762c22f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 1 deletions

View File

@ -72,6 +72,8 @@
|service_protocol|False|Upstream protocol type|only `grpc` and `http` are supported|`http` is the default value; Must set `grpc` if using `gRPC proxy` or `gRPC transcode`|
|labels |False |Match Rules|Key/value pairs to specify attributes|{"version":"v2","build":"16","env":"production"}|
|enable_websocket|False|Auxiliary| enable `websocket`(boolean), default `false`.||
|create_time|False| Auxiliary|epoch timestamp in second| 1602883670|
|update_time|False| Auxiliary|epoch timestamp in second| 1602883670|
For the same type of parameters, such as `host` and `hosts`, `remote_addr` and `remote_addrs` cannot exist at the same time, only one of them can be selected. If enabled at the same time, the API will response an error.
@ -293,6 +295,8 @@ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f13
|desc |False |Auxiliary |service usage scenarios, and more.|customer xxxx|
|labels |False |Match Rules|Key/value pairs to specify attributes|{"version":"v2","build":"16","env":"production"}|
|enable_websocket|False|Auxiliary| enable `websocket`(boolean), default `false`.||
|create_time|False| Auxiliary|epoch timestamp in second| 1602883670|
|update_time|False| Auxiliary|epoch timestamp in second| 1602883670|
Config Example:
@ -433,6 +437,8 @@ Return response from etcd currently.
|plugins |False |Plugin|See [Plugin](architecture-design.md#plugin) for more ||
|desc |False |Auxiliary |Identifies route names, usage scenarios, and more.|customer xxxx|
|labels |False |Match Rules|Key/value pairs to specify attributes|{"version":"v2","build":"16","env":"production"}|
|create_time|False| Auxiliary|epoch timestamp in second| 1602883670|
|update_time|False| Auxiliary|epoch timestamp in second| 1602883670|
Config Example:
@ -513,7 +519,9 @@ In addition to the basic complex equalization algorithm selection, APISIX's Upst
|desc |optional|upstream usage scenarios, and more.|
|pass_host |optional|`pass` pass the client request host, `node` not pass the client request host, using the upstream node host, `rewrite` rewrite host by the configured `upstream_host`.|
|upstream_host |optional|This option is only valid if the `pass_host` is `rewrite`.|
|labels|False |Match Rules|Key/value pairs to specify attributes|{"version":"v2","build":"16","env":"production"}|
|labels|optional |Key/value pairs to specify attributes|{"version":"v2","build":"16","env":"production"}|
|create_time|optional| epoch timestamp in second, like `1602883670`|
|update_time|optional| epoch timestamp in second, like `1602883670`|
Config Example:
@ -656,6 +664,8 @@ Return response from etcd currently.
|key|True|Private key|https Private key||
|sni|True|Match Rules|https SNI||
|labels|False |Match Rules|Key/value pairs to specify attributes|{"version":"v2","build":"16","env":"production"}|
|create_time|False| Auxiliary|epoch timestamp in second| 1602883670|
|update_time|False| Auxiliary|epoch timestamp in second| 1602883670|
Config Example:

View File

@ -76,6 +76,8 @@
|filter_func|可选|匹配规则|用户自定义的过滤函数。可以使用它来实现特殊场景的匹配要求实现。该函数默认接受一个名为 vars 的输入参数,可以用它来获取 Nginx 变量。|function(vars) return vars["arg_name"] == "json" end|
|labels |可选 |匹配规则|标识附加属性的键值对|{"version":"v2","build":"16","env":"production"}|
|enable_websocket|可选 |辅助| 是否启用 `websocket`(boolean), 缺省 `false`.||
|create_time|可选|辅助|单位为秒的 epoch 时间戳|1602883670|
|update_time|可选|辅助|单位为秒的 epoch 时间戳|1602883670|
有两点需要特别注意:
@ -303,6 +305,8 @@ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f13
|desc |可选 |辅助 |服务描述、使用场景等。||
|labels |可选 |匹配规则|标识附加属性的键值对|{"version":"v2","build":"16","env":"production"}|
|enable_websocket|可选 |辅助| 是否启用 `websocket`(boolean), 缺省 `false`.||
|create_time|可选|辅助|单位为秒的 epoch 时间戳|1602883670|
|update_time|可选|辅助|单位为秒的 epoch 时间戳|1602883670|
serivce 对象 json 配置内容:
@ -446,6 +450,8 @@ HTTP/1.1 200 OK
|plugins|可选|Plugin|该 Consumer 对应的插件配置它的优先级是最高的Consumer > Route > Service。对于具体插件配置可以参考 [Plugins](#plugin) 章节。||
|desc |可选 |辅助|consumer描述||
|labels |可选 |匹配规则|标识附加属性的键值对|{"version":"v2","build":"16","env":"production"}|
|create_time|可选|辅助|单位为秒的 epoch 时间戳|1602883670|
|update_time|可选|辅助|单位为秒的 epoch 时间戳|1602883670|
consumer 对象 json 配置内容:
@ -528,6 +534,8 @@ APISIX 的 Upstream 除了基本的复杂均衡算法选择外,还支持对上
|pass_host |可选|枚举|`pass` 透传客户端请求的 host, `node` 不透传客户端请求的 host, 使用 upstream node 配置的 host, `rewrite` 使用 `upstream_host` 配置的值重写 host 。||
|upstream_host |可选|辅助|只在 `pass_host` 配置为 `rewrite` 时有效。||
|labels |可选 |匹配规则|标识附加属性的键值对|{"version":"v2","build":"16","env":"production"}|
|create_time|可选|辅助|单位为秒的 epoch 时间戳|1602883670|
|update_time|可选|辅助|单位为秒的 epoch 时间戳|1602883670|
upstream 对象 json 配置内容:
@ -668,6 +676,8 @@ HTTP/1.1 200 OK
|key|必需|私钥|https 证书私钥||
|sni|必需|匹配规则|https 证书SNI||
|labels|可选|匹配规则|标识附加属性的键值对|{"version":"v2","build":"16","env":"production"}|
|create_time|可选|辅助|单位为秒的 epoch 时间戳|1602883670|
|update_time|可选|辅助|单位为秒的 epoch 时间戳|1602883670|
ssl 对象 json 配置内容: