shenyu-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fengzhenb...@apache.org
Subject [incubator-shenyu-website] branch main updated: update gateway config (#254)
Date Wed, 08 Sep 2021 03:38:55 GMT
This is an automated email from the ASF dual-hosted git repository.

fengzhenbing pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-shenyu-website.git


The following commit(s) were added to refs/heads/main by this push:
     new 1d8e884  update gateway config (#254)
1d8e884 is described below

commit 1d8e884d233ae40f3a402ca23d5716f94f1d944c
Author: xiaoyu <xiaoyu@apache.org>
AuthorDate: Wed Sep 8 11:38:48 2021 +0800

    update gateway config (#254)
    
    * update gateway config
    
    * update gateway config
---
 .../property-config/gateway-property-config.md     | 101 ++++++++++++++++++---
 .../property-config/gateway-property-config.md     |  99 +++++++++++++++++---
 2 files changed, 176 insertions(+), 24 deletions(-)

diff --git a/docs/user-guide/property-config/gateway-property-config.md b/docs/user-guide/property-config/gateway-property-config.md
index 8f6ffa8..8a3d785 100644
--- a/docs/user-guide/property-config/gateway-property-config.md
+++ b/docs/user-guide/property-config/gateway-property-config.md
@@ -36,14 +36,6 @@ shenyu:
 #      closeNotifyFlushTimeout:
 #      closeNotifyReadTimeout:
 #      defaultConfigurationType:
-  file:
-    enabled: true
-  cross:
-    enabled: true
-  exclude:
-    enabled: false
-    paths:
-      - /favicon.ico
   sync:
     websocket:
       urls: ws://localhost:9095/websocket
@@ -70,6 +62,41 @@ shenyu:
 #      url: http://localhost:8500
 #      waitTime: 1000
 #      watchDelay: 1000
+  cross:
+    enabled: true
+    allowedHeaders:
+    allowedMethods: "*"
+    allowedOrigin: "*"
+    allowedExpose: "*"
+    maxAge: "18000"
+    allowCredentials: true
+  switchConfig:
+    local: true
+  file:
+    enabled: true
+    maxSize : 10
+  exclude:
+    enabled: false
+    paths:
+      - /favicon.ico
+  extPlugin:
+    path:
+    enabled: true
+    threads: 1
+    scheduleTime: 300
+    scheduleDelay: 30
+  scheduler:
+    enabled: false
+    type: fixed
+    threads: 16
+  upstreamCheck:
+    enabled: false
+    timeout: 3000
+    healthyThreshold: 1
+    unhealthyThreshold: 1
+    interval: 5000
+    printEnabled: true
+    printInterval: 60000
 ```
 
 ### Property Detail
@@ -136,9 +163,8 @@ File filter properties:
 |Name                      | Type  |  Default   | Required  | Description               
        |
 |:------------------------ |:----- |:-------: |:-------:|:----------------------------|
 | enabled | Boolean |  false  |    No    | enable file size filtering |
-
-
-
+| maxSize | Integer |  10  |    No    | upload file maxSize (MB) |
+     
 
 - `shenyu.cross` config
 
@@ -148,7 +174,12 @@ Cross filter properties:
 |Name                      | Type  |  Default   | Required  | Description               
        |
 |:------------------------ |:----- |:-------: |:-------:|:----------------------------|
 | enabled | Boolean |  false  |    No    | allow cross-domain requests |
-
+| allowedHeaders | String |    |    No    | allowedHeaders, Use "," split in multiple cases
|
+| allowedMethods | String |   "*"  |    No    | allowedMethods |
+| allowedOrigin | String |  "*"  |    No    | allowedOrigin |
+| allowedExpose | String |  "*"  |    No    | allowedExpose |
+| maxAge | String |  "18000"  |    No    | maxAge (ms) |
+| allowCredentials | Boolean |  true  |    No    | allowCredentials |
 
 
 - `shenyu.exclude` config
@@ -161,7 +192,6 @@ Exculde filter properties:
 | paths   | Array   |  null   |   Yes    | Requests matching this list can not pass through
the gateway (support Path-Matching) |
 
 
-
 ##### shenyu.sync config
 
 The Apache ShenYu gateway and the Admin System use data synchronization configurations.
@@ -232,3 +262,48 @@ The following properties are configured for data synchronization using
`consul`
 | waitTime   | int    |  null   |   Yes    | the timeout period for requesting consul service
to pull configuration information (milliseconds) |
 |watchDelay | int | null | Yes |Synchronization interval (milliseconds)|
 
+
+##### shenyu.extPlugin config
+
+The Apache ShenYu Supports dynamic loading of custom plug-ins with the following configuration
+
+|Name                      | Type  |  Default   | Required  | Description               
        |
+|:------------------------ |:----- |:-------: |:-------:|:----------------------------|
+| enabled | Boolean |  true  |    No    | open dynamic loading of custom plug-ins |
+| path | String |     |   False    | custom plugins path, if not config, the path is /ext/lib
|
+| threads | Integer |    1 |   False    | threads for dynamic loading custom plug-ins |
+| scheduleTime | Integer |    300 |   False    | schedule time (s) for dynamic loading custom
plug-ins |
+| scheduleDelay | Integer |    30 |   False    |  schedule delay when app startup|
+
+##### shenyu.scheduler config
+
+scheduler config for Apache ShenYu Scheduler Thread Model 
+
+|Name                      | Type  |  Default   | Required  | Description               
        |
+|:------------------------ |:----- |:-------: |:-------:|:----------------------------|
+| enabled | Boolean |  false  |    No    | Whether to turn on Scheduler Thread Model |
+| type | String |   fixed  |   False    | fixed Thread Pool or elastic  Scheduler Thread
Model|
+| threads | Integer |    Math.max((Runtime.getRuntime().availableProcessors() << 1)
+ 1, 16) |   False    | threads for fixed Thread Pool |
+
+
+##### shenyu.upstreamCheck config
+
+upstreamCheck config is the configuration used by  Apache ShenYu to detect upstream
+
+|Name                      | Type  |  Default   | Required  | Description               
        |
+|:------------------------ |:----- |:-------: |:-------:|:----------------------------|
+| enabled | Boolean |  false  |    No    | Whether to turn on upstreamCheck |
+| timeout | Integer |    3000 |   False    | timeout (ms) |
+| healthyThreshold | Integer |    1 |   False    | healthyThreshold  |
+| unhealthyThreshold | Integer |    1 |   False    | unhealthyThreshold |
+| interval | Integer |    5000 |   False    | schedule time (ms) for checked |
+| printEnabled | Boolean |  true  |    No    | Whether to turn on print logs |
+| printInterval | Integer |    60000 |   False    | schedule time (ms) for print logs |
+
+##### shenyu.switchConfig config
+
+Apache ShenYu Switch Config
+
+|Name                      | Type  |  Default   | Required  | Description               
        |
+|:------------------------ |:----- |:-------: |:-------:|:----------------------------|
+| local | Boolean |  true  |    No    | Whether to open local mode, if so, local operation
data, default open |
diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/property-config/gateway-property-config.md
b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/property-config/gateway-property-config.md
index 3842835..9611659 100644
--- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/property-config/gateway-property-config.md
+++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/property-config/gateway-property-config.md
@@ -36,14 +36,6 @@ shenyu:
 #      closeNotifyFlushTimeout:
 #      closeNotifyReadTimeout:
 #      defaultConfigurationType:
-  file:
-    enabled: true
-  cross:
-    enabled: true
-  exclude:
-    enabled: false
-    paths:
-      - /favicon.ico
   sync:
     websocket:
       urls: ws://localhost:9095/websocket
@@ -70,7 +62,41 @@ shenyu:
 #      url: http://localhost:8500
 #      waitTime: 1000
 #      watchDelay: 1000
-
+  cross:
+    enabled: true
+    allowedHeaders:
+    allowedMethods: "*"
+    allowedOrigin: "*"
+    allowedExpose: "*"
+    maxAge: "18000"
+    allowCredentials: true
+  switchConfig:
+    local: true
+  file:
+    enabled: true
+    maxSize : 10
+  exclude:
+    enabled: false
+    paths:
+      - /favicon.ico
+  extPlugin:
+    path:
+    enabled: true
+    threads: 1
+    scheduleTime: 300
+    scheduleDelay: 30
+  scheduler:
+    enabled: false
+    type: fixed
+    threads: 16
+  upstreamCheck:
+    enabled: false
+    timeout: 3000
+    healthyThreshold: 1
+    unhealthyThreshold: 1
+    interval: 5000
+    printEnabled: true
+    printInterval: 60000
 ```
 
 ### 属性详解
@@ -137,7 +163,7 @@ Netty HttpClient 代理的相关配置:
 | 名称    | 类型    | 默认值 | 是否必填 | 说明                 |
 | :------ | :------ | :----: | :------: | :------------------- |
 | enabled | Boolean | false  |    否    | 是否开启文件大小过滤 |
-
+| maxSize | Integer |  10    |    No    | 上传文件最大值 ,(单位:MB) |
 
 
 - `shenyu.cross` 配置
@@ -147,7 +173,12 @@ Netty HttpClient 代理的相关配置:
 | 名称    | 类型    | 默认值 | 是否必填 | 说明             |
 | :------ | :------ | :----: | :------: | :--------------- |
 | enabled | Boolean | false  |    否    | 是否支持跨域请求 |
-
+| allowedHeaders | String |    |    No    | 允许的Header头,多个请用 "," 分割
|
+| allowedMethods | String |   "*"  |    No    | 允许的方法 |
+| allowedOrigin | String |  "*"  |    No    | 允许的Origin |
+| allowedExpose | String |  "*"  |    No    | 允许的Expose |
+| maxAge | String |  "18000"  |    No    | 最大年龄 (ms) |
+| allowCredentials | Boolean |  true  |    No    | 允许认证 |
 
 
 - `shenyu.exclude` 配置
@@ -228,3 +259,49 @@ Netty HttpClient 代理的相关配置:
 | url        | String |   无   |    是    | `consul`连接地址                      
      |
 | waitTime   | int    |   无   |    是    | 请求consul服务拉取配置信息的超时时间(毫秒)
|
 | watchDelay | int    |   无   |    是    | 同步间隔(毫秒)                  
          |
+
+
+##### shenyu.extPlugin config
+
+Apache ShenYu对于动态加载自定义插件的配置
+
+|Name                      | Type  |  Default   | Required  | Description               
        |
+|:------------------------ |:----- |:-------: |:-------:|:----------------------------|
+| enabled | Boolean |  true  |    No    | 是否开启动态加载自定义插件,默认开启
|
+| path | String |     |   False    | 动态加载自定义插件的路径,如果没配,默认为相对于当前网关路径下的
:/ext/lib,用户也可以使用-Dplugin-ext指定 |
+| threads | Integer |    1 |   False    | 动态加载自定义插件的线程数 |
+| scheduleTime | Integer |    300 |   False    | 动态加载自定义插件的间隔时间
,单元:秒|
+| scheduleDelay | Integer |    30 |   False    |  网关启动多久后去动态加载,单元:秒|
+
+##### shenyu.scheduler config
+
+Apache ShenYu 调度线程模型配置
+
+|Name                      | Type  |  Default   | Required  | Description               
        |
+|:------------------------ |:----- |:-------: |:-------:|:----------------------------|
+| enabled | Boolean |  false  |    No    | 是否开启使用调度线程 |
+| type | String |   fixed  |   False    | 调度线程池类型,默认为fixed,不配置或者其他则为弹性线程池|
+| threads | Integer |    Math.max((Runtime.getRuntime().availableProcessors() << 1)
+ 1, 16) |   False    | 固定线程池类型时候的线程数量 |
+
+
+##### shenyu.upstreamCheck config
+
+Apache ShenYu动态检测upstream的配置
+
+|Name                      | Type  |  Default   | Required  | Description               
        |
+|:------------------------ |:----- |:-------: |:-------:|:----------------------------|
+| enabled | Boolean |  false  |    No    | 是否检测 |
+| timeout | Integer |    3000 |   False    | 超时配置 (ms) |
+| healthyThreshold | Integer |    1 |   False    | 健康因子  |
+| unhealthyThreshold | Integer |    1 |   False    | 不健康因子 |
+| interval | Integer |    5000 |   False    | 检测的调度间隔时间|
+| printEnabled | Boolean |  true  |    No    | 是否打印日志 |
+| printInterval | Integer |    60000 |   False    | 打印日志的间隔调度时间 |
+
+##### shenyu.switchConfig config
+
+Apache ShenYu开关配置
+
+|Name                      | Type  |  Default   | Required  | Description               
        |
+|:------------------------ |:----- |:-------: |:-------:|:----------------------------|
+| local | Boolean |  true  |    No    | 是否开启本地模式,如果开启,本地操作数据,默认开启
|

Mime
View raw message