diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100755 index 6b3dccf5e..000000000 --- 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 000000000..27e921f30 --- /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 855bd5295..861049275 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 1fe41821e..1350c8676 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 6e028aad0..249ed7d7c 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 adb8fd1b5..ef295052c 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 1fe2e2dfb..393f1af76 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 94228e5ed..5bf424e6b 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 3ec548d2f..6bed9e863 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 29dc61b79..bda159e31 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 50ac623d0..e2c1891ae 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 bcc824b84..e20e0a518 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 c7ee5e8fb..7fe3af48f 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 d53eaec02..4150af92b 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 5cc54a91c..56187d93c 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 1a700b0ef..120525daf 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 6e165f922..376103e7d 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 cfbeb2da9..10c49503c 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 dcfd8de6a..7de05efa6 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 000000000..c521c9a73 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 d6e1c2fda..aa24894ad 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 d09d82630..71d58040e 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 e48c47833..b49a400ac 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 fae1e9a38..381f304a2 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 20f0de67f..d2a85311a 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 48dae7450..e089b02be 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 95d93c077..3f3a0188f 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 84b3414f9..84ab3a579 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 361fc3e54..a67f36122 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 55d50c6e8..761df0763 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 3712718a2..e8306a1dd 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 d1f7443aa..6f92070a7 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 e5c0c0b93..2e2412ec9 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 7e336e6e0..42300a277 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 3496e6440..116114913 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 00ad3c9b1..f2dbca3f5 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 aa53afb88..b42d84c37 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 e207f979b..b13f98fe5 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 c65e653c4..407d9281b 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 909896898..4d7d1b14b 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 a8d5da2c3..650f8143a 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.