Skip to content

Commit e7a9c56

Browse files
authored
docs: fix table style in README (#3583)
* chore: remove node_modules from git & add to .gitignore * fix(docs): normalize README table style (MD060) across adapters and cluster modules * docs: fix compact table style in parameter flow README * docs: fix markdownlint MD009 and MD060 in README files * docs: fix table format in parameter-flow-control README (MD060/MD009) * docs: fix table format in spring-webmvc README files (MD060/MD009) * fix: restore UTF-8 encoding and fix markdownlint errors * fix: wrap remaining bare URLs with angle brackets (MD034) * fix: remove trailing spaces from table rows (MD009) --------- Signed-off-by: 赖尧 <[email protected]>
1 parent a08dc69 commit e7a9c56

File tree

10 files changed

+51
-58
lines changed

10 files changed

+51
-58
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ Thumbs.db
3131

3232
# flattened pom file
3333
.flattened-pom.xml
34+
node_modules/

sentinel-adapter/sentinel-apache-httpclient-adapter/README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Sentinel Apache Httpclient Adapter
1+
# Sentinel Apache Httpclient Adapter
22

33
## Introduction
44

@@ -32,11 +32,7 @@ CloseableHttpClient httpclient = builder.build();
3232

3333
- `SentinelApacheHttpClientConfig` configuration:
3434

35-
| name | description | type | default value |
36-
|------|------------|------|-------|
37-
| prefix | customize resource prefix | `String` | `httpclient:` |
38-
| extractor | customize resource extractor | `ApacheHttpClientResourceExtractor` | `DefaultApacheHttpClientResourceExtractor` |
39-
| fallback | handle request when it is blocked | `ApacheHttpClientFallback` | `DefaultApacheHttpClientFallback` |
35+
|name|description|type|default value||------|------------|------|-------||prefix|customize resource prefix|`String`|`httpclient:`||extractor|customize resource extractor|`ApacheHttpClientResourceExtractor`|`DefaultApacheHttpClientResourceExtractor`||fallback|handle request when it is blocked|`ApacheHttpClientFallback`|`DefaultApacheHttpClientFallback`|
4036

4137
### extractor (resource extractor)
4238

sentinel-adapter/sentinel-okhttp-adapter/README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Sentinel OkHttp Adapter
1+
# Sentinel OkHttp Adapter
22

33
## Introduction
44

@@ -26,11 +26,7 @@ OkHttpClient client = new OkHttpClient.Builder()
2626

2727
`SentinelOkHttpConfig` configuration:
2828

29-
| name | description | type | default value |
30-
|------|------------|------|-------|
31-
| resourcePrefix | customized resource name prefix | `String` | `okhttp:` |
32-
| resourceExtractor | customized resource extractor | `OkHttpResourceExtractor` | `DefaultOkHttpResourceExtractor` |
33-
| fallback | handle request when it is blocked | `OkHttpFallback` | `DefaultOkHttpFallback` |
29+
|name|description|type|default value||------|------------|------|-------||resourcePrefix|customized resource name prefix|`String`|`okhttp:`||resourceExtractor|customized resource extractor|`OkHttpResourceExtractor`|`DefaultOkHttpResourceExtractor`||fallback|handle request when it is blocked|`OkHttpFallback`|`DefaultOkHttpFallback`|
3430

3531
### Resource Extractor
3632

sentinel-adapter/sentinel-spring-webmvc-adapter/README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -91,23 +91,23 @@ config.setBlockExceptionHandler((request, response, e) -> {
9191

9292
- Common configuration in `SentinelWebMvcConfig` and `SentinelWebMvcTotalConfig`:
9393

94-
| name | description | type | default value |
95-
|------|------------|------|-------|
96-
| `blockExceptionHandler`| The handler that handles the block request | `BlockExceptionHandler` | null (throw out the BlockException) |
97-
| `originParser` | Extracting request origin (e.g. IP or appName from HTTP Header) from HTTP request | `RequestOriginParser` | - |
94+
| name | description | type | default value |
95+
| ------ | ------------ | ------ | ------- |
96+
| `blockExceptionHandler` | The handler that handles the block request | `BlockExceptionHandler` | null (throw out the BlockException) |
97+
| `originParser` | Extracting request origin (e.g. IP or appName from HTTP Header) from HTTP request | `RequestOriginParser` | - |
9898

9999
- `SentinelWebMvcConfig` configuration:
100100

101-
| name | description | type | default value |
102-
|------|------------|------|-------|
103-
| urlCleaner | The `UrlCleaner` interface is designed for clean and unify the URL resource. | `UrlCleaner` | - |
104-
| requestAttributeName | Attribute key in request used by Sentinel (internal) | `String` | `$$sentinel_spring_web_entry_attr` |
105-
| httpMethodSpecify | Specify whether the URL resource name should contain the HTTP method prefix (e.g. `POST:`). | `boolean` | `false` |
106-
| webContextUnify | Specify whether unify web context(i.e. use the default context name). | `boolean` | `true` |
101+
| name | description | type | default value |
102+
| ------ | ------------ | ------ | ------- |
103+
| urlCleaner | The `UrlCleaner` interface is designed for clean and unify the URL resource. | `UrlCleaner` | - |
104+
| requestAttributeName | Attribute key in request used by Sentinel (internal) | `String` | `$$sentinel_spring_web_entry_attr` |
105+
| httpMethodSpecify | Specify whether the URL resource name should contain the HTTP method prefix (e.g. `POST:`). | `boolean` | `false` |
106+
| webContextUnify | Specify whether unify web context(i.e. use the default context name). | `boolean` | `true` |
107107

108108
- `SentinelWebMvcTotalConfig` configuration:
109109

110-
| name | description | type | default value |
111-
|------|------------|------|-------|
112-
| totalResourceName | The resource name in `SentinelTotalInterceptor` | `String` | `spring-mvc-total-url-request` |
113-
| requestAttributeName | Attribute key in request used by Sentinel (internal) | `String` | `$$sentinel_spring_web_total_entry_attr` |
110+
| name | description | type | default value |
111+
| ------ | ------------ | ------ | ------- |
112+
| totalResourceName | The resource name in `SentinelTotalInterceptor` | `String` | `spring-mvc-total-url-request` |
113+
| requestAttributeName | Attribute key in request used by Sentinel (internal) | `String` | `$$sentinel_spring_web_total_entry_attr` |

sentinel-adapter/sentinel-spring-webmvc-v6x-adapter/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,14 @@ config.setBlockExceptionHandler((request, response, e) -> {
8686
- Common configuration in `SentinelWebMvcConfig` and `SentinelWebMvcTotalConfig`:
8787

8888
| name | description | type | default value |
89-
|------|------------|------|-------|
90-
| `blockExceptionHandler`| The handler that handles the block request | `BlockExceptionHandler` | null (throw out the BlockException) |
89+
| ------ | ------------ | ------ | ------- |
90+
| `blockExceptionHandler` | The handler that handles the block request | `BlockExceptionHandler` | null (throw out the BlockException) |
9191
| `originParser` | Extracting request origin (e.g. IP or appName from HTTP Header) from HTTP request | `RequestOriginParser` | - |
9292

9393
- `SentinelWebMvcConfig` configuration:
9494

9595
| name | description | type | default value |
96-
|------|------------|------|-------|
96+
| ------ | ------------ | ------ | ------- |
9797
| urlCleaner | The `UrlCleaner` interface is designed for clean and unify the URL resource. | `UrlCleaner` | - |
9898
| requestAttributeName | Attribute key in request used by Sentinel (internal) | `String` | `$$sentinel_spring_web_entry_attr` |
9999
| httpMethodSpecify | Specify whether the URL resource name should contain the HTTP method prefix (e.g. `POST:`). | `boolean` | `false` |
@@ -102,6 +102,6 @@ config.setBlockExceptionHandler((request, response, e) -> {
102102
- `SentinelWebMvcTotalConfig` configuration:
103103

104104
| name | description | type | default value |
105-
|------|------------|------|-------|
105+
| ------ | ------------ | ------ | ------- |
106106
| totalResourceName | The resource name in `SentinelTotalInterceptor` | `String` | `spring-mvc-total-url-request` |
107107
| requestAttributeName | Attribute key in request used by Sentinel (internal) | `String` | `$$sentinel_spring_web_total_entry_attr` |

sentinel-cluster/sentinel-cluster-server-envoy-rls/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ We may also retrieve the converted `FlowRule` via the command API `localhost:871
5050

5151
The configuration list:
5252

53-
| Item (env) | Item (JVM property) | Description | Default Value | Required |
54-
|--------|--------|--------|--------|--------|
55-
| `SENTINEL_RLS_GRPC_PORT` | `csp.sentinel.grpc.server.port` | The RLS gRPC server port | **10240** | false |
56-
| `SENTINEL_RLS_RULE_FILE_PATH` | `csp.sentinel.rls.rule.file` | The path of the RLS rule yaml file | - | **true** |
57-
| `SENTINEL_RLS_ACCESS_LOG` | - | Whether to enable the access log (`on` for enable) | off | false |
53+
| Item (env) | Item (JVM property) | Description | Default Value | Required |
54+
| -------- | -------- | -------- | -------- | -------- |
55+
| `SENTINEL_RLS_GRPC_PORT` | `csp.sentinel.grpc.server.port` | The RLS gRPC server port | **10240** | false |
56+
| `SENTINEL_RLS_RULE_FILE_PATH` | `csp.sentinel.rls.rule.file` | The path of the RLS rule yaml file | - | **true** |
57+
| `SENTINEL_RLS_ACCESS_LOG` | - | Whether to enable the access log (`on` for enable) | off | false |
5858

5959
## Samples
6060

sentinel-dashboard/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ java -Dserver.port=8080 \
3131
为便于演示,我们对控制台本身加入了流量控制功能,具体做法是引入 Sentinel 提供的 `CommonFilter` 这个 Servlet Filter。
3232
上述 JVM 参数的含义是:
3333

34-
| 参数 | 作用 |
35-
|--------|--------|
36-
|`-Dcsp.sentinel.dashboard.server=localhost:8080`|向 Sentinel 接入端指定控制台的地址|
37-
|`-Dproject.name=sentinel-dashboard`|向 Sentinel 指定应用名称,比如上面对应的应用名称就为 `sentinel-dashboard`|
34+
| 参数 | 作用 |
35+
| -------- | -------- |
36+
| `-Dcsp.sentinel.dashboard.server=localhost:8080` | 向 Sentinel 接入端指定控制台的地址 |
37+
| `-Dproject.name=sentinel-dashboard` | 向 Sentinel 指定应用名称,比如上面对应的应用名称就为 `sentinel-dashboard` |
3838

3939
全部的配置项可以参考 [启动配置项文档](https://github.com/alibaba/Sentinel/wiki/%E5%90%AF%E5%8A%A8%E9%85%8D%E7%BD%AE%E9%A1%B9)
4040

sentinel-dashboard/Sentinel_Dashboard_Feature.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ Sentinel 提供了多种规则来保护系统的不同部分。流量控制规
5353

5454
> 通过环境变量进行配置时,因为不支持 `.` 所以需要将其更换为 `_`
5555
56-
| 类型 | 默认值 | 最小值 | 描述
57-
--- | --- | --- | --- | ---
58-
sentinel.dashboard.auth.username | String | sentinel | 无 | 登录控制台的用户名,默认为 `sentinel`
59-
sentinel.dashboard.auth.password | String | sentinel | 无 | 登录控制台的密码,默认为 `sentinel`
60-
sentinel.dashboard.app.hideAppNoMachineMillis | Integer | 0 | 60000 | 是否隐藏无健康节点的应用,距离最近一次主机心跳时间的毫秒数,默认关闭
61-
sentinel.dashboard.removeAppNoMachineMillis | Integer | 0 | 120000 | 是否自动删除无健康节点的应用,距离最近一次其下节点的心跳时间毫秒数,默认关闭
62-
sentinel.dashboard.unhealthyMachineMillis | Integer | 60000 | 30000 | 主机失联判定,不可关闭
63-
sentinel.dashboard.autoRemoveMachineMillis | Integer | 0 | 300000 | 距离最近心跳时间超过指定时间是否自动删除失联节点,默认关闭
56+
|类型|默认值|最小值|描述
57+
---|---|---|---|---
58+
sentinel.dashboard.auth.username|String|sentinel|无|登录控制台的用户名,默认为 `sentinel`
59+
sentinel.dashboard.auth.password|String|sentinel|无|登录控制台的密码,默认为 `sentinel`
60+
sentinel.dashboard.app.hideAppNoMachineMillis|Integer|0|60000|是否隐藏无健康节点的应用,距离最近一次主机心跳时间的毫秒数,默认关闭
61+
sentinel.dashboard.removeAppNoMachineMillis|Integer|0|120000|是否自动删除无健康节点的应用,距离最近一次其下节点的心跳时间毫秒数,默认关闭
62+
sentinel.dashboard.unhealthyMachineMillis|Integer|60000|30000|主机失联判定,不可关闭
63+
sentinel.dashboard.autoRemoveMachineMillis|Integer|0|300000|距离最近心跳时间超过指定时间是否自动删除失联节点,默认关闭
6464

6565
配置示例:
6666

@@ -85,4 +85,4 @@ sentinel_dashboard_app_hideAppNoMachineMillis=60000
8585
更多:
8686

8787
- [Sentinel 控制台启动和客户端接入](./README.md)
88-
- [控制台 Wiki](https://github.com/alibaba/Sentinel/wiki/%E6%8E%A7%E5%88%B6%E5%8F%B0)
88+
- [控制台 Wiki](<https://github.com/alibaba/Sentinel/wiki/%E6%8E%A7%E5%88%B6%E5%8F%B0>)

sentinel-demo/sentinel-demo-dubbo/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public ConsumerConfig consumerConfig() {
2929

3030
## Service Provider
3131

32-
Service Provider 用于向外界提供服务,处理各个消费者的调用请求。为了保护 Provider 不被激增的流量拖垮影响稳定性,可以给 Provider 配置 **QPS 模式**的限流,这样当每秒的请求量超过设定的阈值时会自动拒绝多的请求。限流粒度可以是服务接口和服务方法两种粒度。若希望整个服务接口的 QPS 不超过一定数值,则可以为对应服务接口资源(resourceName 为**接口全限定名**)配置 QPS 阈值;若希望服务的某个方法的 QPS 不超过一定数值,则可以为对应服务方法资源(resourceName 为**接口全限定名:方法签名**)配置 QPS 阈值。有关配置详情请参考 [流量控制 | Sentinel](https://github.com/alibaba/Sentinel/wiki/%E6%B5%81%E9%87%8F%E6%8E%A7%E5%88%B6)
32+
Service Provider 用于向外界提供服务,处理各个消费者的调用请求。为了保护 Provider 不被激增的流量拖垮影响稳定性,可以给 Provider 配置 **QPS 模式**的限流,这样当每秒的请求量超过设定的阈值时会自动拒绝多的请求。限流粒度可以是服务接口和服务方法两种粒度。若希望整个服务接口的 QPS 不超过一定数值,则可以为对应服务接口资源(resourceName 为**接口全限定名**)配置 QPS 阈值;若希望服务的某个方法的 QPS 不超过一定数值,则可以为对应服务方法资源(resourceName 为**接口全限定名:方法签名**)配置 QPS 阈值。有关配置详情请参考 [流量控制 | Sentinel](<https://github.com/alibaba/Sentinel/wiki/%E6%B5%81%E9%87%8F%E6%8E%A7%E5%88%B6>)
3333

3434
Demo 1 演示了此限流场景,我们看一下这种模式的限流产生的效果。假设我们已经定义了某个服务接口 `com.alibaba.csp.sentinel.demo.dubbo.FooService`,其中有一个方法 `sayHello(java.lang.String)`,Provider 端该方法设定 QPS 阈值为 10。在 Consumer 端在 1s 之内连续发起 15 次调用,可以通过日志文件看到 Provider 端被限流。拦截日志统一记录在 `~/logs/csp/sentinel-block.log` 中:
3535

@@ -70,7 +70,7 @@ Demo 2 演示了此限流场景,我们看一下这种模式的效果。假设
7070

7171
### 服务降级
7272

73-
当服务依赖于多个下游服务,而某个下游服务调用非常慢时,会严重影响当前服务的调用。这里我们可以利用 Sentinel 熔断降级的功能,为调用端配置基于平均 RT 的[降级规则](https://github.com/alibaba/Sentinel/wiki/%E7%86%94%E6%96%AD%E9%99%8D%E7%BA%A7)。这样当调用链路中某个服务调用的平均 RT 升高,在一定的次数内超过配置的 RT 阈值,Sentinel 就会对此调用资源进行降级操作,接下来的调用都会立刻拒绝,直到过了一段设定的时间后才恢复,从而保护服务不被调用端短板所影响。同时可以配合 fallback 功能使用,在被降级的时候提供相应的处理逻辑。
73+
当服务依赖于多个下游服务,而某个下游服务调用非常慢时,会严重影响当前服务的调用。这里我们可以利用 Sentinel 熔断降级的功能,为调用端配置基于平均 RT 的[降级规则](<https://github.com/alibaba/Sentinel/wiki/%E7%86%94%E6%96%AD%E9%99%8D%E7%BA%A7>)。这样当调用链路中某个服务调用的平均 RT 升高,在一定的次数内超过配置的 RT 阈值,Sentinel 就会对此调用资源进行降级操作,接下来的调用都会立刻拒绝,直到过了一段设定的时间后才恢复,从而保护服务不被调用端短板所影响。同时可以配合 fallback 功能使用,在被降级的时候提供相应的处理逻辑。
7474

7575
## Fallback
7676

@@ -80,11 +80,11 @@ Demo 2 的 Consumer 端提供了一个简单的 fallback 示例。
8080

8181
## Sentinel Dashboard
8282

83-
Sentinel 还提供 API 用于获取实时的监控信息,对应文档见[此处](https://github.com/alibaba/Sentinel/wiki/%E5%AE%9E%E6%97%B6%E7%9B%91%E6%8E%A7)。为了便于使用,Sentinel 还提供了一个控制台(Dashboard)用于配置规则、查看监控、机器发现等功能。
83+
Sentinel 还提供 API 用于获取实时的监控信息,对应文档见[此处](<https://github.com/alibaba/Sentinel/wiki/%E5%AE%9E%E6%97%B6%E7%9B%91%E6%8E%A7>)。为了便于使用,Sentinel 还提供了一个控制台(Dashboard)用于配置规则、查看监控、机器发现等功能。
8484

8585
接入 Dashboard 的步骤(**缺一不可**):
8686

87-
1. 按照 [Sentinel 控制台文档](https://github.com/alibaba/Sentinel/wiki/%E6%8E%A7%E5%88%B6%E5%8F%B0) 启动控制台
87+
1. 按照 [Sentinel 控制台文档](<https://github.com/alibaba/Sentinel/wiki/%E6%8E%A7%E5%88%B6%E5%8F%B0>) 启动控制台
8888
2. 应用引入 `sentinel-transport-simple-http` 依赖,以便控制台可以拉取对应应用的相关信息
8989
3. 给应用添加相关的启动参数,启动应用。需要配置的参数有:
9090
- `-Dcsp.sentinel.api.port`:客户端的 port,用于上报相关信息

sentinel-extension/sentinel-parameter-flow-control/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Sentinel Parameter Flow Control
1+
# Sentinel Parameter Flow Control
22

33
This component provides functionality of flow control by frequent ("hot spot") parameters.
44

@@ -49,11 +49,11 @@ ParamFlowRuleManager.loadRules(Collections.singletonList(rule));
4949
The description for fields of `ParamFlowRule`:
5050

5151
| Field | Description | Default |
52-
| :----: | :----| :----|
53-
| resource| resource name (**required**) ||
54-
| count | flow control threshold (**required**) ||
52+
| :---: | :--- | :--- |
53+
| resource | resource name (**required**) | |
54+
| count | flow control threshold (**required**) | |
5555
| grade | metric type (QPS or thread count) | QPS mode |
56-
| paramIdx | the index of provided parameter in `SphU.entry(xxx, args)` (**required**) ||
57-
| paramFlowItemList | the exception items of parameter; you can set threshold to a specific parameter value ||
56+
| paramIdx | the index of provided parameter in `SphU.entry(xxx, args)` (**required**) | |
57+
| paramFlowItemList | the exception items of parameter; you can set threshold to a specific parameter value | |
5858

5959
Now the parameter flow control rules will take effect.

0 commit comments

Comments
 (0)