mirror of https://github.com/alibaba/Sentinel.git
Move document-lint from circleci to github-actions (#3345)
Move document-lint from circleci to github-actions. Adjust document according to markdownlint-cli rules.
This commit is contained in:
parent
03fe33ee0b
commit
ae6ebb49d0
|
@ -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
|
|
@ -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 --
|
|
@ -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 <sentinel@linux.alibaba.com>. 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.
|
||||
|
|
|
@ -73,7 +73,7 @@ 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 <sentinel@linux.alibaba.com>.
|
||||
|
||||
#### Gitter
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<img src="https://user-images.githubusercontent.com/9434884/43697219-3cb4ef3a-9975-11e8-9a9c-73f4f537442d.png" alt="Sentinel Logo" width="50%">
|
||||
|
||||
# Sentinel: The Sentinel of Your Microservices
|
||||
|
||||
<img src="https://user-images.githubusercontent.com/9434884/43697219-3cb4ef3a-9975-11e8-9a9c-73f4f537442d.png" alt="Sentinel Logo" width="50%">
|
||||
|
||||
[](https://github.com/alibaba/Sentinel/actions/workflows/ci.yml)
|
||||
[](https://codecov.io/gh/alibaba/Sentinel)
|
||||
[](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
|
||||
|
|
|
@ -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
|
||||
|
||||
- <img src="https://raw.githubusercontent.com/sentinel-group/sentinel-awesome/master/sentinel_favicon.ico" title="Sentinel official" height="16px"> [Sentinel Go](https://github.com/alibaba/sentinel-golang)
|
||||
- <img src="https://raw.githubusercontent.com/sentinel-group/sentinel-awesome/master/sentinel_favicon.ico" title="Sentinel official" height="16px"> [Sentinel C++](https://github.com/alibaba/sentinel-cpp)
|
||||
- <img src="https://raw.githubusercontent.com/sentinel-group/sentinel-awesome/master/sentinel_favicon.ico" title="Sentinel official" height="16px"> [Sentinel Rust](https://github.com/sentinel-group/sentinel-rust)
|
||||
- <img alt="Sentinel Go" src="https://raw.githubusercontent.com/sentinel-group/sentinel-awesome/master/sentinel_favicon.ico" title="Sentinel official" height="16px"> [Sentinel Go](https://github.com/alibaba/sentinel-golang)
|
||||
- <img alt="Sentinel C++" src="https://raw.githubusercontent.com/sentinel-group/sentinel-awesome/master/sentinel_favicon.ico" title="Sentinel official" height="16px"> [Sentinel C++](https://github.com/alibaba/sentinel-cpp)
|
||||
- <img alt="Sentinel Rust" src="https://raw.githubusercontent.com/sentinel-group/sentinel-awesome/master/sentinel_favicon.ico" title="Sentinel official" height="16px"> [Sentinel Rust](https://github.com/sentinel-group/sentinel-rust)
|
||||
|
||||
## Extensions / Integrations
|
||||
|
||||
|
|
|
@ -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<Response>() {
|
||||
@Override
|
||||
public Response get() {
|
||||
|
@ -67,7 +67,7 @@ Response response = SentinelJaxRsClientTemplate.execute(resourceName, new Suppli
|
|||
|
||||
or executeAsync like this:
|
||||
|
||||
```
|
||||
```java
|
||||
Future<Response> future = SentinelJaxRsClientTemplate.executeAsync(resourceName, new Supplier<Future<Response>>() {
|
||||
@Override
|
||||
public Future<Response> get() {
|
||||
|
|
|
@ -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]
|
||||
```
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
<img width="792" src="https://user-images.githubusercontent.com/9305625/47277113-6b5da780-d5ef-11e8-8a0a-93a6b09b0887.png">
|
||||
<img width="792" src="image/sentinel-zuul.png" alt="sentinel zuul">
|
||||
|
||||
The order of filters can be changed via the constructor.
|
||||
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 72 KiB |
|
@ -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 .
|
||||
```
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
Sentinel 控制台是流量控制、熔断降级规则统一配置和管理的入口,它为用户提供了机器自发现、簇点链路自发现、监控、规则配置等功能。在 Sentinel 控制台上,我们可以配置规则并实时查看流量控制效果。使用 Sentinel 控制台的流程如下:
|
||||
|
||||
```
|
||||
```plaintext
|
||||
客户端接入 -> 机器自发现 -> 查看簇点链路 -> 配置流控规则 -> 查看流控效果
|
||||
```
|
||||
|
||||
|
|
|
@ -12,19 +12,19 @@
|
|||
|
||||
## Install Packages
|
||||
|
||||
```
|
||||
```shell
|
||||
npm install
|
||||
```
|
||||
|
||||
## Start Development
|
||||
|
||||
```
|
||||
```shell
|
||||
npm start
|
||||
```
|
||||
|
||||
## Build for production
|
||||
|
||||
```
|
||||
```shell
|
||||
npm run build
|
||||
```
|
||||
|
||||
|
|
|
@ -12,19 +12,19 @@
|
|||
|
||||
## 安装依赖
|
||||
|
||||
```
|
||||
```shell
|
||||
npm i
|
||||
```
|
||||
|
||||
## 开始本地开发
|
||||
|
||||
```
|
||||
```shell
|
||||
npm start
|
||||
```
|
||||
|
||||
## 构建前端资源
|
||||
|
||||
```
|
||||
```shell
|
||||
npm run build
|
||||
```
|
||||
|
||||
|
|
|
@ -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
|
||||
```
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -2,5 +2,3 @@
|
|||
|
||||
Sentinel extension modules provide additional extension points
|
||||
and functions.
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
|
|
|
@ -15,7 +15,7 @@ To use Sentinel DataSource Etcd, you should add the following dependency:
|
|||
|
||||
We could configure Etcd connection configuration by config file (for example `sentinel.properties`):
|
||||
|
||||
```
|
||||
```properties
|
||||
csp.sentinel.etcd.endpoints=http://ip1:port1,http://ip2:port2
|
||||
csp.sentinel.etcd.user=your_user
|
||||
csp.sentinel.etcd.password=your_password
|
||||
|
|
|
@ -51,7 +51,7 @@ public EurekaDataSource<List<FlowRule>> 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}
|
||||
```
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue