This is an automated email from the ASF dual-hosted git repository.

tokers pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new 843a652  docs: update the admin-api.md document (#3805)
843a652 is described below

commit 843a6523d3803a73bb67352c0177459d6586edc1
Author: Yuelin Zheng <2226815...@qq.com>
AuthorDate: Fri Mar 12 09:07:50 2021 +0800

    docs: update the admin-api.md document (#3805)
    
    related issue #3802
---
 docs/en/latest/admin-api.md | 24 ++++++++++++------------
 docs/zh/latest/admin-api.md |  6 +++---
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/docs/en/latest/admin-api.md b/docs/en/latest/admin-api.md
index 5015891..604e3bb 100644
--- a/docs/en/latest/admin-api.md
+++ b/docs/en/latest/admin-api.md
@@ -517,25 +517,25 @@ Return response from etcd currently.
 
 In addition to the basic complex equalization algorithm selection, APISIX's 
Upstream also supports logic for upstream passive health check and retry, see 
the table below.
 
-|Name    |Optional|Description|
-|-------         |-----|------|
+|Name            |Optional|Description|
+|----------------|--------|-----------|
 |type            |required|the balancer algorithm|
 |nodes           |required, can't be used with `service_name` |Hash table, the 
key of the internal element is the upstream machine address list, the format is 
`Address + Port`, where the address part can be IP or domain name, such as 
`192.168.1.100:80`, `foo.com:80`, etc. Value is the weight of the node. In 
particular, when the weight value is `0`, it has a special meaning, which 
usually means that the upstream node is invalid and never wants to be selected. 
The `nodes` can be empty, whi [...]
 |service_name    |required, can't be used with `nodes` |the name of service 
used in the service discovery, see [discovery](discovery.md) for more details|
-|discovery_type |required, if `service_name` is used | the type of service 
discovery, see [discovery](discovery.md) for more details|
+|discovery_type  |required, if `service_name` is used | the type of service 
discovery, see [discovery](discovery.md) for more details|
 |hash_on         |optional|This option is only valid if the `type` is `chash`. 
Supported types `vars`(Nginx variables), `header`(custom header), `cookie`, 
`consumer`, the default value is `vars`.|
 |key             |optional|This option is only valid if the `type` is `chash`. 
Find the corresponding node `id` according to `hash_on` and `key`. When 
`hash_on` is set as `vars`, `key` is the required parameter, for now, it 
support nginx built-in variables like `uri, server_name, server_addr, 
request_uri, remote_port, remote_addr, query_string, host, hostname, arg_***`, 
`arg_***` is arguments in the request line, [Nginx variables 
list](http://nginx.org/en/docs/varindex.html). When `hash_ [...]
 |checks          |optional|Configure the parameters of the health check. For 
details, refer to [health-check](health-check.md).|
 |retries         |optional|Pass the request to the next upstream using the 
underlying Nginx retry mechanism, the retry mechanism is enabled by default and 
set the number of retries according to the number of available backend nodes. 
If `retries` option is explicitly set, it will override the default value. `0` 
means disable retry mechanism.|
-|timeout|optional| Set the timeout for connection, sending and receiving 
messages. |
-|name     |optional|Identifies upstream names|
-|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`. Default to `pass`.|
-|upstream_host    |optional|This option is only valid if the `pass_host` is 
`rewrite`.|
-|scheme|optional |The scheme used when talk with the upstream. The value is 
one of ['http', 'https', 'grpc', 'grpcs'], default to 'http'.|
-|labels|optional |Key/value pairs to specify 
attributes|{"version":"v2","build":"16","env":"production"}|
-|create_time|optional| epoch timestamp in second, like `1602883670`, will be 
created automatically if missing|
-|update_time|optional| epoch timestamp in second, like `1602883670`, will be 
created automatically if missing|
+|timeout         |optional| Set the timeout for connection, sending and 
receiving messages. |
+|name            |optional|Identifies upstream names|
+|desc            |optional|upstream usage scenarios, and more.|
+|pass_host       |optional|Specify the source of the upstream request host, 
can be one of [`pass`, `node`, `rewrite`]. `pass`: use the host requested by 
the client as the host of the upstream request, `node`: use the host configured 
in the node of `upstream` as the upstream request host, `rewrite`: use the 
value configured by `upstream_host` to rewrite the upstream request host. The 
default is the `pass` method.|
+|upstream_host   |optional|Specify the host of the upstream request. This 
option is only valid if the `pass_host` is `rewrite`.|
+|scheme          |optional |The scheme used when talk with the upstream. The 
value is one of ['http', 'https', 'grpc', 'grpcs'], default to 'http'.|
+|labels          |optional |Key/value pairs to specify 
attributes|{"version":"v2","build":"16","env":"production"}|
+|create_time     |optional| epoch timestamp in second, like `1602883670`, will 
be created automatically if missing|
+|update_time     |optional| epoch timestamp in second, like `1602883670`, will 
be created automatically if missing|
 
 `type` can be one of:
 
diff --git a/docs/zh/latest/admin-api.md b/docs/zh/latest/admin-api.md
index 510c7ea..e0cfa77 100644
--- a/docs/zh/latest/admin-api.md
+++ b/docs/zh/latest/admin-api.md
@@ -528,7 +528,7 @@ Date: Thu, 26 Dec 2019 08:17:49 GMT
 APISIX 的 Upstream 除了基本的复杂均衡算法选择外,还支持对上游做主被动健康检查、重试等逻辑,具体看下面表格。
 
 | 名字           | 可选项                             | 类型           | 说明           
                                                                                
                                                                                
                                                                                
                                                                                
             | 示例                                             |
-| -------------- | ---------------------------------- | -------------- | 
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 | ------------------------------------------------ | --- |
+| -------------- | ---------------------------------- | -------------- | 
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 | ------------------------------------------------ |
 | type           | 必需                               | 枚举           |           
                                                                                
                                                                                
                                                                                
                                                                                
                  | 负载均衡算法                                     |     |
 | nodes          | 必需,不能和 `service_name` 一起用 | Node           | 哈希表,内部元素的 key 
是上游机器地址列表,格式为`地址 + Port`,其中地址部分可以是 IP 也可以是域名,比如 
`192.168.1.100:80`、`foo.com:80`等。value 则是节点的权重,特别的,当权重值为 `0` 
有特殊含义,通常代表该上游节点失效,永远不希望被选中。`nodes` 可以为空,这通常用作占位符。客户端命中这样的上游会返回 502。             
                           | `192.168.1.100:80`                               |
 | service_name   | 必需,不能和 `nodes` 一起用        | string         | 
服务发现时使用的服务名,见[集成服务发现注册中心](./discovery.md)                                       
                                                                                
                                                                                
                                                                                
     | `a-bootiful-client`                              |
@@ -540,8 +540,8 @@ APISIX 的 Upstream 除了基本的复杂均衡算法选择外,还支持对上
 | hash_on        | 可选                               | 辅助           | `hash_on` 
支持的类型有 `vars`(Nginx 内置变量),`header`(自定义 header),`cookie`,`consumer`,默认值为 `vars`  
                                                                                
                                                                                
                                                                         |
 | name           | 可选                               | 辅助           | 
标识上游服务名称、使用场景等。                                                                 
                                                                                
                                                                                
                                                                                
             |                                                  |
 | desc           | 可选                               | 辅助           | 
上游服务描述、使用场景等。                                                                   
                                                                                
                                                                                
                                                                                
               |                                                  |
-| pass_host      | 可选                               | 枚举           | `pass` 
透传客户端请求的 host, `node` 不透传客户端请求的 host, 使用 upstream node 配置的 host, `rewrite` 使用 
`upstream_host` 配置的值重写 host 。默认为 `pass`。                                        
                                                                                
                                                                    |           
                                       |
-| upstream_host  | 可选                               | 辅助           | 只在 
`pass_host` 配置为 `rewrite` 时有效。                                                  
                                                                                
                                                                                
                                                                                
                |                                                  |
+| pass_host      | 可选                               | 枚举           | 指定上游请求 
host 的来源,可以是 [`pass`,`node`,`rewrite`] 之一。`pass`: 使用客户端请求的 host 作为上游请求的 host, 
`node`: 使用 `upstream` 的 node 中配置的 host 作为上游请求 host, `rewrite`: 使用 
`upstream_host` 配置的值重写上游请求 host。默认为 `pass` 方式。                                  
                                                                                
                                                      |                         
                         |
+| upstream_host  | 可选                               | 辅助           | 指定上游请求的 
host,只在 `pass_host` 配置为 `rewrite` 时有效。                                          
                                                                                
                                                                                
                                                                                
                        |                                                  |
 | scheme         | 可选                               | 辅助           | 跟上游通信时使用的 
scheme。需要是 ['http', 'https', 'grpc', 'grpcs'] 其中的一个,默认是 'http'。                 
                                                                                
                                                                                
                                                                           |
 | labels         | 可选                               | 匹配规则       | 标识附加属性的键值对  
                                                                                
                                                                                
                                                                                
                                                                                
      | {"version":"v2","build":"16","env":"production"} |
 | create_time    | 可选                               | 辅助           | 单位为秒的 
epoch 时间戳,如果不指定则自动创建                                                            
                                                                                
                                                                                
                                                                                
   | 1602883670                                       |

Reply via email to