This is an automated email from the ASF dual-hosted git repository.
hefengen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/shenyu-website.git
The following commit(s) were added to refs/heads/main by this push:
new 7c9064e3fd [Fix] Modify the explanation about 'handler' in the
selector in the English version of the document. (#1004)
7c9064e3fd is described below
commit 7c9064e3fd70487daad2a9a9e7dc9f036dae8060
Author: lulu <[email protected]>
AuthorDate: Tue Jan 30 09:54:22 2024 +0800
[Fix] Modify the explanation about 'handler' in the selector in the English
version of the document. (#1004)
* Fix: Modify the explanation about 'handler' in the selector in the
Chinese version of the document.
* Fix: Modify the explanation about 'handler' in the selector in the
English version of the document.
---
docs/user-guide/admin-usage/selector-and-rule.md | 12 +++++++++++-
.../current/user-guide/admin-usage/selector-and-rule.md | 12 +++++++++++-
.../user-guide/admin-usage/selector-and-rule.md | 15 +++++++++++----
.../user-guide/admin-usage/selector-and-rule.md | 12 +++++++++++-
4 files changed, 44 insertions(+), 7 deletions(-)
diff --git a/docs/user-guide/admin-usage/selector-and-rule.md
b/docs/user-guide/admin-usage/selector-and-rule.md
index e2ad2e058e..75dbfd2e0a 100644
--- a/docs/user-guide/admin-usage/selector-and-rule.md
+++ b/docs/user-guide/admin-usage/selector-and-rule.md
@@ -54,7 +54,17 @@ For example, add a selector to the `divide` plugin:
* PrintLogs: it will print the matching log with the open option enabled.
* Enable: whether to enable the plugin.
* Order:the smaller will have high priority to execute among multi-selectors.
- * Handler: The operation when the request matches the selector.
+ * Handler: The `handle` field, configured in [Plugin handle
management](./plugin-handle-explanation). Its purpose is to determine the
actions to take when the request matches this selector. Within the selector,
the `handle` field is often used to represent a manually maintained list of
service instances. Each service instance includes the following fields:
+ - `host`: Host address
+ - `ip:port`: IP+port address
+ - `protocol`: Protocol
+ - `weight`: Weight of the service instance
+ - `warmupTime`: Service warm-up time
+ - `startupTime`: Service startup time
+ - `status`: true indicates the service node is available, false indicates
it is not available
+
+> **Note**: For plugins that incorporate service discovery modules (such as
the Divide plugin, Grpc plugin, and WebSocket plugin), the selector page does
not display the handler (i.e., the `handle` field). Instead, it is manually
managed through the `Service Discovery` tab under local mode. See [Discovery
Module](../discovery/discovery-mode) for details.
+
* the above picture means: when the prefix of the request uri is `/http`, it
will redirect to this service `127.0.0.1:8080`.
* selector advice : combine `uri` condition and `startsWith`
prefix(/contextPath/)as the first request filter.
* selector(the same for rule) match condition fuzzy string matching rule:
diff --git
a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/admin-usage/selector-and-rule.md
b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/admin-usage/selector-and-rule.md
index f3f79b26ac..b25a124dd8 100644
---
a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/admin-usage/selector-and-rule.md
+++
b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/admin-usage/selector-and-rule.md
@@ -48,7 +48,17 @@ description: 选择器和规则管理
* 是否开启:打开才会生效。
* 打印日志:打开时,当匹配上的时候,会打印匹配日志。
* 执行顺序:当多个选择器的时候,执行顺序小的优先执行,值越小优先级越高。
- * 处理:即`handle`字段,在 [插件处理管理](./plugin-handle-explanation)
中进行设置。作用是:当请求流量匹配上该选择器时,做什么样的处理操作。
+ * 处理:即`handle`字段,在 [插件处理管理](./plugin-handle-explanation)
中进行设置。作用是:当请求流量匹配上该选择器时,做什么样的处理操作。
在选择器中,`handle`字段往往用来表示用户手动维护的服务实例列表,每条服务实例信息包含以下字段:
+ - `host`:host地址
+ - `ip:port`:ip+port地址
+ - `protocol`:协议
+ - `weight`:服务实例的权重
+ - `warmupTime`:服务预热时间
+ - `startupTime`:服务开启时间
+ - `status`:true: 服务节点可用,false: 服务节点不可用
+
+>
**注意**:对于引入了服务发现模块的插件(如Divide插件、Grpc插件和WebSocket插件),选择器页面上不展示处理(即`handle`字段),而是通过`服务发现`标签页下的local模式来手动维护服务下游实例列表,详见[服务发现模块](../discovery/discovery-mode)
。
+
* 上述图片中表示: 当请求的 `uri` 前缀是 `/http`,会转发到 `127.0.0.1:8080` 这个服务上。
* 选择器建议:可以通过设置 `uri` 条件, `startsWith` 前缀(`/contextPath/`)匹配,进行第一道流量筛选。
* 选择器(同规则)模糊匹配条件规则:
diff --git
a/i18n/zh/docusaurus-plugin-content-docs/version-2.6.1/user-guide/admin-usage/selector-and-rule.md
b/i18n/zh/docusaurus-plugin-content-docs/version-2.6.1/user-guide/admin-usage/selector-and-rule.md
index f3f79b26ac..5fc7338fdc 100644
---
a/i18n/zh/docusaurus-plugin-content-docs/version-2.6.1/user-guide/admin-usage/selector-and-rule.md
+++
b/i18n/zh/docusaurus-plugin-content-docs/version-2.6.1/user-guide/admin-usage/selector-and-rule.md
@@ -48,7 +48,17 @@ description: 选择器和规则管理
* 是否开启:打开才会生效。
* 打印日志:打开时,当匹配上的时候,会打印匹配日志。
* 执行顺序:当多个选择器的时候,执行顺序小的优先执行,值越小优先级越高。
- * 处理:即`handle`字段,在 [插件处理管理](./plugin-handle-explanation)
中进行设置。作用是:当请求流量匹配上该选择器时,做什么样的处理操作。
+ * 处理:即`handle`字段,在 [插件处理管理](./plugin-handle-explanation)
中进行设置。作用是:当请求流量匹配上该选择器时,做什么样的处理操作。
在选择器中,`handle`字段往往用来表示用户手动维护的服务实例列表,每条服务实例信息包含以下字段:
+ - `host`:host地址
+ - `ip:port`:ip+port地址
+ - `protocol`:协议
+ - `weight`:服务实例的权重
+ - `warmupTime`:服务预热时间
+ - `startupTime`:服务开启时间
+ - `status`:true: 服务节点可用,false: 服务节点不可用
+
+>
**注意**:对于引入了服务发现模块的插件(如Divide插件、Grpc插件和WebSocket插件),选择器页面上不展示处理(即`handle`字段),而是通过`服务发现`标签页下的local模式来手动维护服务下游实例列表,详见[服务发现模块](../discovery/discovery-mode)
。
+
* 上述图片中表示: 当请求的 `uri` 前缀是 `/http`,会转发到 `127.0.0.1:8080` 这个服务上。
* 选择器建议:可以通过设置 `uri` 条件, `startsWith` 前缀(`/contextPath/`)匹配,进行第一道流量筛选。
* 选择器(同规则)模糊匹配条件规则:
@@ -61,9 +71,7 @@ description: 选择器和规则管理

* 当流量经过选择器匹配成功之后,会进入规则来进行最终的流量匹配。
-
* 规则是对流量最终执行逻辑的确认。
-
* 规则详解:
* 名称:给规则取一个名字。
* 匹配方式:`and` 或者 `or` 是指下面多个条件的组合方式。
@@ -93,7 +101,6 @@ description: 选择器和规则管理
* 处理:即`handle`字段,在 [插件处理管理](./plugin-handle-explanation)
中进行设置。每个插件的规则处理不一样,具体请查看每个对应插件的处理。
* 上图表示:当 `uri` 等于 `/http/order/save` 的时候能够匹配上该规则,就会执行该规则中,负载策略是
`random`,重试次数是 `3` 等处理操作。
-
* 规则建议:可以`uri` 条件, `match` 最真实的`uri路径`,进行流量的最终筛选 。
联合选择器,我们来表述一下:当一个请求的 `uri` 为 `/http/order/save`,会通过 `random` 的方式,转发到
`127.0.0.1:8080` 机器上。
diff --git
a/versioned_docs/version-2.6.1/user-guide/admin-usage/selector-and-rule.md
b/versioned_docs/version-2.6.1/user-guide/admin-usage/selector-and-rule.md
index e2ad2e058e..75dbfd2e0a 100644
--- a/versioned_docs/version-2.6.1/user-guide/admin-usage/selector-and-rule.md
+++ b/versioned_docs/version-2.6.1/user-guide/admin-usage/selector-and-rule.md
@@ -54,7 +54,17 @@ For example, add a selector to the `divide` plugin:
* PrintLogs: it will print the matching log with the open option enabled.
* Enable: whether to enable the plugin.
* Order:the smaller will have high priority to execute among multi-selectors.
- * Handler: The operation when the request matches the selector.
+ * Handler: The `handle` field, configured in [Plugin handle
management](./plugin-handle-explanation). Its purpose is to determine the
actions to take when the request matches this selector. Within the selector,
the `handle` field is often used to represent a manually maintained list of
service instances. Each service instance includes the following fields:
+ - `host`: Host address
+ - `ip:port`: IP+port address
+ - `protocol`: Protocol
+ - `weight`: Weight of the service instance
+ - `warmupTime`: Service warm-up time
+ - `startupTime`: Service startup time
+ - `status`: true indicates the service node is available, false indicates
it is not available
+
+> **Note**: For plugins that incorporate service discovery modules (such as
the Divide plugin, Grpc plugin, and WebSocket plugin), the selector page does
not display the handler (i.e., the `handle` field). Instead, it is manually
managed through the `Service Discovery` tab under local mode. See [Discovery
Module](../discovery/discovery-mode) for details.
+
* the above picture means: when the prefix of the request uri is `/http`, it
will redirect to this service `127.0.0.1:8080`.
* selector advice : combine `uri` condition and `startsWith`
prefix(/contextPath/)as the first request filter.
* selector(the same for rule) match condition fuzzy string matching rule: