diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100755 index 6b3dccf5ee..0000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,41 +0,0 @@ -version: 2 -jobs: - document-lint: - docker: - # this image is build from Dockerfile - # https://github.com/pouchcontainer/pouchlinter/blob/master/Dockerfile - - image: pouchcontainer/pouchlinter:v0.1.2 - working_directory: ~/sentinel - steps: - - checkout - - run: - name: use markdownlint v0.5.0 to lint markdown file (https://github.com/markdownlint/markdownlint) - command: | - find ./ -name "*.md" | grep -v vendor | grep -v commandline | grep -v .github | grep -v swagger | grep -v api | xargs mdl -r ~MD010,~MD013,~MD024,~MD029,~MD033,~MD036 -# - run: -# name: use markdown-link-check(https://github.com/tcort/markdown-link-check) to check links in markdown files -# command: | -# set +e -# for name in $(find . -name \*.md | grep -v vendor | grep -v CHANGELOG); do -# if [ -f $name ]; then -# markdown-link-check -q $name; -# if [ $? -ne 0 ]; then -# code=1 -# fi -# fi -# done -# bash -c "exit $code"; -# - run: -# name: use opensource tool client9/misspell to correct commonly misspelled English words -# command: | -# find ./* -name "*" | grep -v vendor | xargs misspell -error -# - run: -# name: use ShellCheck (https://github.com/koalaman/shellcheck) to check the validateness of shell scripts in pouch repo -# command: | -# find ./ -name "*.sh" | grep -v vendor | xargs shellcheck - -workflows: - version: 2 - ci: - jobs: - - document-lint diff --git a/.github/workflows/document-lint.yml b/.github/workflows/document-lint.yml new file mode 100644 index 0000000000..27e921f302 --- /dev/null +++ b/.github/workflows/document-lint.yml @@ -0,0 +1,25 @@ +name: document-lint + +on: + push: + branches: + - '*' + pull_request: + branches: + - master + - "1.8" + - "2.0" + +jobs: + document-lint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - run: npm install -g markdownlint-cli + + - name: use markdownlint-cli to lint markdown file + run: | + find ./ -name "*.md" | grep -v vendor | grep -v commandline | grep -v .github | grep -v swagger | grep -v api | \ + xargs markdownlint --disable MD010 MD013 MD024 MD029 MD033 MD036 -- diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 855bd52955..8610492759 100755 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -55,7 +55,7 @@ further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at sentinel@linux.alibaba.com. All +reported by contacting the project team at . All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1fe41821e9..1350c86766 100755 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -73,8 +73,8 @@ All code should be well reviewed by one or more committers. Some principles: #### Mailing list -If you have any questions or advice, please contact sentinel@linux.alibaba.com. +If you have any questions or advice, please contact . #### Gitter -Our Gitter room: [https://gitter.im/alibaba/Sentinel](https://gitter.im/alibaba/Sentinel). \ No newline at end of file +Our Gitter room: [https://gitter.im/alibaba/Sentinel](https://gitter.im/alibaba/Sentinel). diff --git a/README.md b/README.md index 6e028aad08..249ed7d7cd 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -Sentinel Logo - # Sentinel: The Sentinel of Your Microservices +Sentinel Logo + [![Sentinel CI](https://github.com/alibaba/Sentinel/actions/workflows/ci.yml/badge.svg)](https://github.com/alibaba/Sentinel/actions/workflows/ci.yml) [![Codecov](https://codecov.io/gh/alibaba/Sentinel/branch/master/graph/badge.svg)](https://codecov.io/gh/alibaba/Sentinel) [![Maven Central](https://img.shields.io/maven-central/v/com.alibaba.csp/sentinel-core.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:com.alibaba.csp%20AND%20a:sentinel-core) @@ -111,7 +111,7 @@ For more information, please refer to [How To Use](https://sentinelguard.io/en-u After running the demo for a while, you can see the following records in `~/logs/csp/${appName}-metrics.log.{date}` (When using the default `DateFileLogHandler`). -``` +```plaintext |--timestamp-|------date time----|-resource-|p |block|s |e|rt |occupied 1529998904000|2018-06-26 15:41:44|HelloWorld|20|0 |20|0|0 |0 1529998905000|2018-06-26 15:41:45|HelloWorld|20|5579 |20|0|728 |0 diff --git a/doc/awesome-sentinel.md b/doc/awesome-sentinel.md index adb8fd1b57..ef295052cc 100644 --- a/doc/awesome-sentinel.md +++ b/doc/awesome-sentinel.md @@ -12,8 +12,8 @@ You can also add to [sentinel-group/sentinel-awesome](https://github.com/sentine ## Contents - [Presentations](#presentations) -- [Tutorials](#tutorials) -- [Demos](#demos) +- [Tutorials](#tutorialssamples) +- [Demos](../demos) - [Extensions / Integrations](#extensions--integrations) - [Blog Posts](#blog-posts) @@ -31,9 +31,9 @@ You can also add to [sentinel-group/sentinel-awesome](https://github.com/sentine ## Polyglot Support -- [Sentinel Go](https://github.com/alibaba/sentinel-golang) -- [Sentinel C++](https://github.com/alibaba/sentinel-cpp) -- [Sentinel Rust](https://github.com/sentinel-group/sentinel-rust) +- Sentinel Go [Sentinel Go](https://github.com/alibaba/sentinel-golang) +- Sentinel C++ [Sentinel C++](https://github.com/alibaba/sentinel-cpp) +- Sentinel Rust [Sentinel Rust](https://github.com/sentinel-group/sentinel-rust) ## Extensions / Integrations diff --git a/sentinel-adapter/sentinel-apache-dubbo-adapter/README.md b/sentinel-adapter/sentinel-apache-dubbo-adapter/README.md index 1fe2e2dfb0..393f1af76a 100755 --- a/sentinel-adapter/sentinel-apache-dubbo-adapter/README.md +++ b/sentinel-adapter/sentinel-apache-dubbo-adapter/README.md @@ -69,4 +69,4 @@ flow control, degrade or system load protection. You can implement your own `Dub and then register to `DubboAdapterGlobalConfig`. If no fallback is configured, Sentinel will wrap the `BlockException` as the fallback result. -Besides, we can also leverage [Dubbo mock mechanism](http://dubbo.apache.org/en-us/docs/user/demos/local-mock.html) to provide fallback implementation of degraded Dubbo services. \ No newline at end of file +Besides, we can also leverage [Dubbo mock mechanism](http://dubbo.apache.org/en-us/docs/user/demos/local-mock.html) to provide fallback implementation of degraded Dubbo services. diff --git a/sentinel-adapter/sentinel-apache-dubbo3-adapter/README.md b/sentinel-adapter/sentinel-apache-dubbo3-adapter/README.md index 94228e5ed7..5bf424e6bc 100755 --- a/sentinel-adapter/sentinel-apache-dubbo3-adapter/README.md +++ b/sentinel-adapter/sentinel-apache-dubbo3-adapter/README.md @@ -68,4 +68,4 @@ and then register to `DubboAdapterGlobalConfig`. If no fallback is configured, Sentinel will wrap the `BlockException` with a `RuntimeException` as the fallback result. -Besides, we can also leverage [Dubbo mock mechanism](https://dubbo.apache.org/zh/docs3-v2/java-sdk/advanced-features-and-usage/service/service-downgrade/) to provide fallback implementation of degraded Dubbo services. \ No newline at end of file +Besides, we can also leverage [Dubbo mock mechanism](https://dubbo.apache.org/zh/docs3-v2/java-sdk/advanced-features-and-usage/service/service-downgrade/) to provide fallback implementation of degraded Dubbo services. diff --git a/sentinel-adapter/sentinel-apache-httpclient-adapter/README.md b/sentinel-adapter/sentinel-apache-httpclient-adapter/README.md index 3ec548d2f6..6bed9e8635 100755 --- a/sentinel-adapter/sentinel-apache-httpclient-adapter/README.md +++ b/sentinel-adapter/sentinel-apache-httpclient-adapter/README.md @@ -72,4 +72,4 @@ public class DefaultApacheHttpClientFallback implements ApacheHttpClientFallback throw new SentinelRpcException(e); } } -``` \ No newline at end of file +``` diff --git a/sentinel-adapter/sentinel-dubbo-adapter/README.md b/sentinel-adapter/sentinel-dubbo-adapter/README.md index 29dc61b79a..bda159e314 100755 --- a/sentinel-adapter/sentinel-dubbo-adapter/README.md +++ b/sentinel-adapter/sentinel-dubbo-adapter/README.md @@ -69,4 +69,4 @@ flow control, degrade or system load protection. You can implement your own `Dub and then register to `DubboAdapterGlobalConfig`. If no fallback is configured, Sentinel will wrap the `BlockException` as the fallback result. -Besides, we can also leverage [Dubbo mock mechanism](http://dubbo.apache.org/en-us/docs/user/demos/local-mock.html) to provide fallback implementation of degraded Dubbo services. \ No newline at end of file +Besides, we can also leverage [Dubbo mock mechanism](http://dubbo.apache.org/en-us/docs/user/demos/local-mock.html) to provide fallback implementation of degraded Dubbo services. diff --git a/sentinel-adapter/sentinel-jax-rs-adapter/README.md b/sentinel-adapter/sentinel-jax-rs-adapter/README.md index 50ac623d01..e2c1891ae9 100755 --- a/sentinel-adapter/sentinel-jax-rs-adapter/README.md +++ b/sentinel-adapter/sentinel-jax-rs-adapter/README.md @@ -55,7 +55,7 @@ As describe in `6.7.1 exceptions` of [jaxrs-2_1-final-spec](https://download.ora For jax-rs client, we provide `SentinelJaxRsClientTemplate` you can use it like this: -``` +```java Response response = SentinelJaxRsClientTemplate.execute(resourceName, new Supplier() { @Override public Response get() { @@ -67,7 +67,7 @@ Response response = SentinelJaxRsClientTemplate.execute(resourceName, new Suppli or executeAsync like this: -``` +```java Future future = SentinelJaxRsClientTemplate.executeAsync(resourceName, new Supplier>() { @Override public Future get() { diff --git a/sentinel-adapter/sentinel-okhttp-adapter/README.md b/sentinel-adapter/sentinel-okhttp-adapter/README.md index bcc824b84d..e20e0a5185 100755 --- a/sentinel-adapter/sentinel-okhttp-adapter/README.md +++ b/sentinel-adapter/sentinel-okhttp-adapter/README.md @@ -62,4 +62,4 @@ public class DefaultOkHttpFallback implements OkHttpFallback { return new Response(myErrorBuilder); } } -``` \ No newline at end of file +``` diff --git a/sentinel-adapter/sentinel-quarkus-adapter/README.md b/sentinel-adapter/sentinel-quarkus-adapter/README.md index c7ee5e8fbe..7fe3af48ff 100644 --- a/sentinel-adapter/sentinel-quarkus-adapter/README.md +++ b/sentinel-adapter/sentinel-quarkus-adapter/README.md @@ -28,7 +28,7 @@ To use sentinel-annotation-quarkus-adapter, you can simply add the following dep When Quarkus application started, you can see the enabled feature like: -``` +```plaintext INFO [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, resteasy, sentinel-annotation, sentinel-jax-rs] ``` @@ -51,7 +51,7 @@ If you're using `sentinel-jax-rs-quarkus-adapter`, you'll need to set `quarkus.n When Quarkus application started, you can see the enabled feature like: -``` +```plaintext INFO [io.quarkus] (main) Installed features: [cdi, resteasy, sentinel-annotation, sentinel-jax-rs, sentinel-native-image] ``` diff --git a/sentinel-adapter/sentinel-reactor-adapter/README.md b/sentinel-adapter/sentinel-reactor-adapter/README.md index d53eaec027..4150af92b0 100644 --- a/sentinel-adapter/sentinel-reactor-adapter/README.md +++ b/sentinel-adapter/sentinel-reactor-adapter/README.md @@ -18,4 +18,4 @@ Example: someService.doSomething() // return type: Mono or Flux .transform(new SentinelReactorTransformer<>(resourceName)) // transform here .subscribe(); -``` \ No newline at end of file +``` diff --git a/sentinel-adapter/sentinel-sofa-rpc-adapter/README.md b/sentinel-adapter/sentinel-sofa-rpc-adapter/README.md index 5cc54a91c1..56187d93cd 100755 --- a/sentinel-adapter/sentinel-sofa-rpc-adapter/README.md +++ b/sentinel-adapter/sentinel-sofa-rpc-adapter/README.md @@ -61,4 +61,4 @@ Sentinel SOFARPC Adapter supports global fallback configuration. The global fallback will handle exceptions and give replacement result when blocked by flow control, degrade or system load protection. You can implement your own `SofaRpcFallback` interface and then register to `SofaRpcFallbackRegistry`. If no fallback is configured, Sentinel will wrap the `BlockException` -then directly throw it out. \ No newline at end of file +then directly throw it out. diff --git a/sentinel-adapter/sentinel-spring-cloud-gateway-adapter/README.md b/sentinel-adapter/sentinel-spring-cloud-gateway-adapter/README.md index 1a700b0efa..120525dafd 100644 --- a/sentinel-adapter/sentinel-spring-cloud-gateway-adapter/README.md +++ b/sentinel-adapter/sentinel-spring-cloud-gateway-adapter/README.md @@ -49,4 +49,4 @@ The gateway adapter will regard all `routeId` (defined in Spring properties) and You can register various customized callback in `GatewayCallbackManager`: -- `setBlockHandler`: register a customized `BlockRequestHandler` to handle the blocked request. The default implementation is `DefaultBlockRequestHandler`, which returns default message like `Blocked by Sentinel: FlowException`. \ No newline at end of file +- `setBlockHandler`: register a customized `BlockRequestHandler` to handle the blocked request. The default implementation is `DefaultBlockRequestHandler`, which returns default message like `Blocked by Sentinel: FlowException`. diff --git a/sentinel-adapter/sentinel-spring-webflux-adapter/README.md b/sentinel-adapter/sentinel-spring-webflux-adapter/README.md index 6e165f922e..376103e7d7 100644 --- a/sentinel-adapter/sentinel-spring-webflux-adapter/README.md +++ b/sentinel-adapter/sentinel-spring-webflux-adapter/README.md @@ -51,4 +51,4 @@ You can register various customized callback in `WebFluxCallbackManager`: - `setUrlCleaner`: used for normalization of URL. The function type is `(ServerWebExchange, String) → String`, which means `(webExchange, originalUrl) → finalUrl`, if the finalUrl is `"""` or `null`, the URLs will be excluded (since Sentinel 1.7.0).. - `setRequestOriginParser`: used to resolve the origin from the HTTP request. The function type is `ServerWebExchange → String`. -You can also refer to the demo: [sentinel-demo-spring-webflux](https://github.com/alibaba/Sentinel/tree/master/sentinel-demo/sentinel-demo-spring-webflux). \ No newline at end of file +You can also refer to the demo: [sentinel-demo-spring-webflux](https://github.com/alibaba/Sentinel/tree/master/sentinel-demo/sentinel-demo-spring-webflux). diff --git a/sentinel-adapter/sentinel-spring-webmvc-adapter/README.md b/sentinel-adapter/sentinel-spring-webmvc-adapter/README.md index cfbeb2da95..10c49503c2 100755 --- a/sentinel-adapter/sentinel-spring-webmvc-adapter/README.md +++ b/sentinel-adapter/sentinel-spring-webmvc-adapter/README.md @@ -104,4 +104,4 @@ config.setBlockExceptionHandler((request, response, e) -> { | name | description | type | default value | |------|------------|------|-------| | totalResourceName | The resource name in `SentinelTotalInterceptor` | `String` | `spring-mvc-total-url-request` | -| requestAttributeName | Attribute key in request used by Sentinel (internal) | `String` | `$$sentinel_spring_web_total_entry_attr` | \ No newline at end of file +| requestAttributeName | Attribute key in request used by Sentinel (internal) | `String` | `$$sentinel_spring_web_total_entry_attr` | diff --git a/sentinel-adapter/sentinel-zuul-adapter/README.md b/sentinel-adapter/sentinel-zuul-adapter/README.md index dcfd8de6af..7de05efa6a 100755 --- a/sentinel-adapter/sentinel-zuul-adapter/README.md +++ b/sentinel-adapter/sentinel-zuul-adapter/README.md @@ -66,7 +66,7 @@ As Zuul run as per thread per connection block model, we add filters around rout - `SentinelZuulPostFilter`: When the response has no exception caught, the post filter will complete the entries. - `SentinelZuulErrorFilter`: When an exception is caught, the filter will trace the exception and complete the entries. - +sentinel zuul The order of filters can be changed via the constructor. @@ -144,4 +144,4 @@ public class MyRequestOriginParser implements RequestOriginParser { return request.getRemoteAddr(); } } -``` \ No newline at end of file +``` diff --git a/sentinel-adapter/sentinel-zuul-adapter/image/sentinel-zuul.png b/sentinel-adapter/sentinel-zuul-adapter/image/sentinel-zuul.png new file mode 100644 index 0000000000..c521c9a73d Binary files /dev/null and b/sentinel-adapter/sentinel-zuul-adapter/image/sentinel-zuul.png differ diff --git a/sentinel-cluster/README.md b/sentinel-cluster/README.md index d6e1c2fda0..aa24894adf 100644 --- a/sentinel-cluster/README.md +++ b/sentinel-cluster/README.md @@ -4,4 +4,4 @@ This is the default implementation of Sentinel cluster flow control. - `sentinel-cluster-common-default`: common module for cluster transport and functions - `sentinel-cluster-client-default`: default cluster client module using Netty as underlying transport library -- `sentinel-cluster-server-default`: default cluster server module \ No newline at end of file +- `sentinel-cluster-server-default`: default cluster server module diff --git a/sentinel-cluster/sentinel-cluster-client-default/README.md b/sentinel-cluster/sentinel-cluster-client-default/README.md index d09d826302..71d58040e9 100644 --- a/sentinel-cluster/sentinel-cluster-client-default/README.md +++ b/sentinel-cluster/sentinel-cluster-client-default/README.md @@ -1 +1 @@ -# Sentinel Cluster Client (Default) \ No newline at end of file +# Sentinel Cluster Client (Default) diff --git a/sentinel-dashboard/README.md b/sentinel-dashboard/README.md index e48c47833d..b49a400ac0 100755 --- a/sentinel-dashboard/README.md +++ b/sentinel-dashboard/README.md @@ -60,7 +60,7 @@ java -Dserver.port=8080 \ ## 6. 构建Docker镜像 -``` +```bash docker build --build-arg SENTINEL_VERSION=1.8.7 -t ${REGISTRY}/sentinel-dashboard:v1.8.7 . ``` diff --git a/sentinel-dashboard/Sentinel_Dashboard_Feature.md b/sentinel-dashboard/Sentinel_Dashboard_Feature.md index fae1e9a382..381f304a2d 100755 --- a/sentinel-dashboard/Sentinel_Dashboard_Feature.md +++ b/sentinel-dashboard/Sentinel_Dashboard_Feature.md @@ -4,7 +4,7 @@ Sentinel 控制台是流量控制、熔断降级规则统一配置和管理的入口,它为用户提供了机器自发现、簇点链路自发现、监控、规则配置等功能。在 Sentinel 控制台上,我们可以配置规则并实时查看流量控制效果。使用 Sentinel 控制台的流程如下: -``` +```plaintext 客户端接入 -> 机器自发现 -> 查看簇点链路 -> 配置流控规则 -> 查看流控效果 ``` @@ -85,4 +85,4 @@ sentinel_dashboard_app_hideAppNoMachineMillis=60000 更多: - [Sentinel 控制台启动和客户端接入](./README.md) -- [控制台 Wiki](https://github.com/alibaba/Sentinel/wiki/%E6%8E%A7%E5%88%B6%E5%8F%B0) \ No newline at end of file +- [控制台 Wiki](https://github.com/alibaba/Sentinel/wiki/%E6%8E%A7%E5%88%B6%E5%8F%B0) diff --git a/sentinel-dashboard/src/main/webapp/resources/README.md b/sentinel-dashboard/src/main/webapp/resources/README.md index 20f0de67f0..d2a85311a9 100755 --- a/sentinel-dashboard/src/main/webapp/resources/README.md +++ b/sentinel-dashboard/src/main/webapp/resources/README.md @@ -12,22 +12,22 @@ ## Install Packages -``` +```shell npm install ``` ## Start Development -``` +```shell npm start ``` ## Build for production -``` +```shell npm run build ``` ## Credit -- [sb-admin-angular](https://github.com/start-angular/sb-admin-angular) \ No newline at end of file +- [sb-admin-angular](https://github.com/start-angular/sb-admin-angular) diff --git a/sentinel-dashboard/src/main/webapp/resources/README_zh.md b/sentinel-dashboard/src/main/webapp/resources/README_zh.md index 48dae74500..e089b02be6 100644 --- a/sentinel-dashboard/src/main/webapp/resources/README_zh.md +++ b/sentinel-dashboard/src/main/webapp/resources/README_zh.md @@ -12,22 +12,22 @@ ## 安装依赖 -``` +```shell npm i ``` ## 开始本地开发 -``` +```shell npm start ``` ## 构建前端资源 -``` +```shell npm run build ``` ## Credit -- [sb-admin-angular](https://github.com/start-angular/sb-admin-angular) \ No newline at end of file +- [sb-admin-angular](https://github.com/start-angular/sb-admin-angular) diff --git a/sentinel-demo/sentinel-demo-cluster/sentinel-demo-cluster-embedded/README.md b/sentinel-demo/sentinel-demo-cluster/sentinel-demo-cluster-embedded/README.md index 95d93c0773..3f3a0188fb 100644 --- a/sentinel-demo/sentinel-demo-cluster/sentinel-demo-cluster-embedded/README.md +++ b/sentinel-demo/sentinel-demo-cluster/sentinel-demo-cluster-embedded/README.md @@ -3,4 +3,4 @@ This demo demonstrates how to configure data source for cluster rules and configuration in **embedded mode**. You can start multiple `ClusterDemoApplication` instances and do cluster assignment in Sentinel dashboard or via dynamic data source. -See [DemoClusterInitFunc](https://github.com/alibaba/Sentinel/blob/master/sentinel-demo/sentinel-demo-cluster/sentinel-demo-cluster-embedded/src/main/java/com/alibaba/csp/sentinel/demo/cluster/init/DemoClusterInitFunc.java) for a sample of dynamic configuration. \ No newline at end of file +See [DemoClusterInitFunc](https://github.com/alibaba/Sentinel/blob/master/sentinel-demo/sentinel-demo-cluster/sentinel-demo-cluster-embedded/src/main/java/com/alibaba/csp/sentinel/demo/cluster/init/DemoClusterInitFunc.java) for a sample of dynamic configuration. diff --git a/sentinel-demo/sentinel-demo-dubbo/README.md b/sentinel-demo/sentinel-demo-dubbo/README.md index 84b3414f9c..84ab3a5796 100644 --- a/sentinel-demo/sentinel-demo-dubbo/README.md +++ b/sentinel-demo/sentinel-demo-dubbo/README.md @@ -33,13 +33,13 @@ Service Provider 用于向外界提供服务,处理各个消费者的调用请 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` 中: -``` +```plaintext 2018-07-24 17:13:43|1|com.alibaba.csp.sentinel.demo.dubbo.FooService:sayHello(java.lang.String),FlowException,default,|5,0 ``` 在 Provider 对应的 metrics 日志中也有记录: -``` +```plaintext 1532423623000|2018-07-24 17:13:43|com.alibaba.csp.sentinel.demo.dubbo.FooService|15|0|15|0|3 1532423623000|2018-07-24 17:13:43|com.alibaba.csp.sentinel.demo.dubbo.FooService:sayHello(java.lang.String)|10|5|10|0|0 ``` @@ -50,7 +50,7 @@ Demo 1 演示了此限流场景,我们看一下这种模式的限流产生的 在限流日志中会也会记录调用方的名称,如: -``` +```plaintext 2018-07-25 16:26:48|1|com.alibaba.csp.sentinel.demo.dubbo.FooService:sayHello(java.lang.String),FlowException,default,demo-consumer|5,0 ``` diff --git a/sentinel-demo/sentinel-demo-quarkus/README.md b/sentinel-demo/sentinel-demo-quarkus/README.md index 361fc3e54a..a67f36122e 100644 --- a/sentinel-demo/sentinel-demo-quarkus/README.md +++ b/sentinel-demo/sentinel-demo-quarkus/README.md @@ -8,7 +8,7 @@ If you want to learn more about Quarkus, please visit its website: [quarkus.io]( You can run your application in dev mode that enables live coding using: -``` +```bash ./mvnw quarkus:dev ``` @@ -29,4 +29,3 @@ Or, if you don't have GraalVM installed, you can run the native executable build You can then execute your native executable with: `./target/sentinel-demo-quarkus-1.0-SNAPSHOT-runner` If you want to learn more about building native executables, please consult [building-native-image](https://quarkus.io/guides/building-native-image) - diff --git a/sentinel-demo/sentinel-demo-rocketmq/README.md b/sentinel-demo/sentinel-demo-rocketmq/README.md index 55d50c6e88..761df07636 100644 --- a/sentinel-demo/sentinel-demo-rocketmq/README.md +++ b/sentinel-demo/sentinel-demo-rocketmq/README.md @@ -12,4 +12,4 @@ Sentinel provides a feature for this kind of scenario: [Rate Limiter](https://gi For example, we configure the rule with uniform rate limiting mode and QPS count is 5, which indicates messages are consumed at fixed interval (200 ms) and pending messages will queue. We also set the maximum queuing timeout is 5s, then all requests estimated to exceed the timeout will be rejected immediately. -![Uniform rate](https://github.com/alibaba/Sentinel/wiki/image/uniform-speed-queue.png) \ No newline at end of file +![Uniform rate](https://github.com/alibaba/Sentinel/wiki/image/uniform-speed-queue.png) diff --git a/sentinel-demo/sentinel-demo-sofa-rpc/README.md b/sentinel-demo/sentinel-demo-sofa-rpc/README.md index 3712718a21..e8306a1dd1 100644 --- a/sentinel-demo/sentinel-demo-sofa-rpc/README.md +++ b/sentinel-demo/sentinel-demo-sofa-rpc/README.md @@ -39,4 +39,4 @@ consumerConfig.setParameter("sofa.rpc.sentinel.enabled", "false"); 通过控制台实时监控、簇点链路菜单观察接口调用、资源情况;对资源设置不同流控规则,进行观察和调试。 -参考:[Sentinel 控制台文档](https://github.com/alibaba/Sentinel/wiki/控制台). \ No newline at end of file +参考:[Sentinel 控制台文档](https://github.com/alibaba/Sentinel/wiki/控制台). diff --git a/sentinel-extension/README.md b/sentinel-extension/README.md index d1f7443aaf..6f92070a73 100755 --- a/sentinel-extension/README.md +++ b/sentinel-extension/README.md @@ -2,5 +2,3 @@ Sentinel extension modules provide additional extension points and functions. - - diff --git a/sentinel-extension/sentinel-annotation-cdi-interceptor/README.md b/sentinel-extension/sentinel-annotation-cdi-interceptor/README.md index e5c0c0b937..2e2412ec9b 100644 --- a/sentinel-extension/sentinel-annotation-cdi-interceptor/README.md +++ b/sentinel-extension/sentinel-annotation-cdi-interceptor/README.md @@ -47,7 +47,7 @@ public String defaultFallback(Throwable t) { According to [9.4. Interceptor enablement and ordering](https://docs.jboss.org/cdi/spec/2.0/cdi-spec.html#enabled_interceptors), to enable the interceptor, we may add configuration in `resources/META-INF/beans.xml` like this: -``` +```xml > flowRuleEtcdDataSource = new EtcdData FlowRuleManager.register2Property(flowRuleEtcdDataSource.getProperty()); ``` -We've also provided an example: [sentinel-demo-etcd-datasource](https://github.com/alibaba/Sentinel/tree/master/sentinel-demo/sentinel-demo-etcd-datasource) \ No newline at end of file +We've also provided an example: [sentinel-demo-etcd-datasource](https://github.com/alibaba/Sentinel/tree/master/sentinel-demo/sentinel-demo-etcd-datasource) diff --git a/sentinel-extension/sentinel-datasource-eureka/README.md b/sentinel-extension/sentinel-datasource-eureka/README.md index 7e336e6e0f..42300a277b 100644 --- a/sentinel-extension/sentinel-datasource-eureka/README.md +++ b/sentinel-extension/sentinel-datasource-eureka/README.md @@ -51,8 +51,8 @@ public EurekaDataSource> eurekaDataSource(EurekaInstanceConfig eu To refresh the rule dynamically, you need to call [Eureka-REST-operations](https://github.com/Netflix/eureka/wiki/Eureka-REST-operations) to update instance metadata: -``` +```plaintext PUT /eureka/apps/{appID}/{instanceID}/metadata?{ruleKey}={json of the rules} ``` -Note: don't forget to encode your JSON string in the url. \ No newline at end of file +Note: don't forget to encode your JSON string in the url. diff --git a/sentinel-extension/sentinel-datasource-nacos/README.md b/sentinel-extension/sentinel-datasource-nacos/README.md index 3496e64406..1161149134 100644 --- a/sentinel-extension/sentinel-datasource-nacos/README.md +++ b/sentinel-extension/sentinel-datasource-nacos/README.md @@ -24,4 +24,4 @@ ReadableDataSource> flowRuleDataSource = new NacosDataSou FlowRuleManager.register2Property(flowRuleDataSource.getProperty()); ``` -We've also provided an example: [sentinel-demo-nacos-datasource](https://github.com/alibaba/Sentinel/tree/master/sentinel-demo/sentinel-demo-nacos-datasource). \ No newline at end of file +We've also provided an example: [sentinel-demo-nacos-datasource](https://github.com/alibaba/Sentinel/tree/master/sentinel-demo/sentinel-demo-nacos-datasource). diff --git a/sentinel-extension/sentinel-datasource-redis/README.md b/sentinel-extension/sentinel-datasource-redis/README.md index 00ad3c9b16..f2dbca3f53 100644 --- a/sentinel-extension/sentinel-datasource-redis/README.md +++ b/sentinel-extension/sentinel-datasource-redis/README.md @@ -36,7 +36,7 @@ You can also create multi data sources to subscribe for different rule type. Note that the data source first loads initial rules from a Redis String (provided `ruleKey`) during initialization. So for consistency, users should publish the value and save the value to the `ruleKey` simultaneously like this (using Redis transaction): -``` +```plaintext MULTI SET ruleKey value PUBLISH channel value diff --git a/sentinel-extension/sentinel-datasource-spring-cloud-config/README.md b/sentinel-extension/sentinel-datasource-spring-cloud-config/README.md index aa53afb884..b42d84c374 100644 --- a/sentinel-extension/sentinel-datasource-spring-cloud-config/README.md +++ b/sentinel-extension/sentinel-datasource-spring-cloud-config/README.md @@ -28,7 +28,7 @@ We may refer to the the sample `com.alibaba.csp.sentinel.datasource.spring.cloud We offer test cases and demo in the package: `com.alibaba.csp.sentinel.datasource.spring.cloud.config.test`. When you are running test cases, please follow the steps: -``` +```plaintext // First, start the Spring Cloud config server com.alibaba.csp.sentinel.datasource.spring.cloud.config.server.ConfigServer @@ -38,4 +38,4 @@ com.alibaba.csp.sentinel.datasource.spring.cloud.config.client.ConfigClient // Third, run the test cases and demo com.alibaba.csp.sentinel.datasource.spring.cloud.config.test.SentinelRuleLocatorTests com.alibaba.csp.sentinel.datasource.spring.cloud.config.test.SpringCouldDataSourceTest -``` \ No newline at end of file +``` diff --git a/sentinel-extension/sentinel-datasource-zookeeper/README.md b/sentinel-extension/sentinel-datasource-zookeeper/README.md index e207f979b6..b13f98fe56 100644 --- a/sentinel-extension/sentinel-datasource-zookeeper/README.md +++ b/sentinel-extension/sentinel-datasource-zookeeper/README.md @@ -24,4 +24,4 @@ FlowRuleManager.register2Property(flowRuleDataSource.getProperty()); > Note: It's not recommended to add a large amount of rules to a single path (has limitation, also leads to bad performance). -We've also provided an example: [sentinel-demo-zookeeper-datasource](https://github.com/alibaba/Sentinel/tree/master/sentinel-demo/sentinel-demo-zookeeper-datasource). \ No newline at end of file +We've also provided an example: [sentinel-demo-zookeeper-datasource](https://github.com/alibaba/Sentinel/tree/master/sentinel-demo/sentinel-demo-zookeeper-datasource). diff --git a/sentinel-extension/sentinel-metric-exporter/README.md b/sentinel-extension/sentinel-metric-exporter/README.md index c65e653c4e..407d9281b8 100644 --- a/sentinel-extension/sentinel-metric-exporter/README.md +++ b/sentinel-extension/sentinel-metric-exporter/README.md @@ -14,4 +14,4 @@ To use Sentinel Metric Exporter, you should add the following dependency: And then you can find the MBean info in your tool. -![MBean Info](https://user-images.githubusercontent.com/25661357/150902723-6350a629-a173-47f9-a94b-6563ae55a5ce.png "MBean Info") \ No newline at end of file +![MBean Info](https://user-images.githubusercontent.com/25661357/150902723-6350a629-a173-47f9-a94b-6563ae55a5ce.png "MBean Info") diff --git a/sentinel-extension/sentinel-parameter-flow-control/README.md b/sentinel-extension/sentinel-parameter-flow-control/README.md index 9098968986..4d7d1b14b4 100644 --- a/sentinel-extension/sentinel-parameter-flow-control/README.md +++ b/sentinel-extension/sentinel-parameter-flow-control/README.md @@ -56,4 +56,4 @@ The description for fields of `ParamFlowRule`: | paramIdx | the index of provided parameter in `SphU.entry(xxx, args)` (**required**) || | paramFlowItemList | the exception items of parameter; you can set threshold to a specific parameter value || -Now the parameter flow control rules will take effect. \ No newline at end of file +Now the parameter flow control rules will take effect. diff --git a/sentinel-transport/README.md b/sentinel-transport/README.md index a8d5da2c35..650f8143af 100644 --- a/sentinel-transport/README.md +++ b/sentinel-transport/README.md @@ -1,4 +1,4 @@ # Sentinel Transport The Sentinel transport module provides basic interfaces about Sentinel monitoring API server and client -(`CommandCenter` and `HeartbeatSender`) as well implementations using different libraries or protocols. \ No newline at end of file +(`CommandCenter` and `HeartbeatSender`) as well implementations using different libraries or protocols.