You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/02/16 14:43:21 UTC
[GitHub] [dubbo-go-pixiu] baerwang opened a new pull request #364: feat:circuit breaker
baerwang opened a new pull request #364:
URL: https://github.com/apache/dubbo-go-pixiu/pull/364
<!-- Thanks for sending a pull request!
-->
**What this PR does**:
**Which issue(s) this PR fixes**:
<!--
*Automatically closes linked issue when PR is merged.
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
_If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_*
-->
Fixes #
**Features**
refer to #357
**Special notes for your reviewer**:
**Does this PR introduce a user-facing change?**:
<!--
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->
```release-note
NONE
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-pixiu] sanxun0325 commented on a change in pull request #364: feat:circuit breaker
Posted by GitBox <gi...@apache.org>.
sanxun0325 commented on a change in pull request #364:
URL: https://github.com/apache/dubbo-go-pixiu/pull/364#discussion_r815606839
##########
File path: pkg/filter/sentinel/circuitbreaker/config.go
##########
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package circuitbreaker
+
+import "github.com/alibaba/sentinel-golang/core/circuitbreaker"
+
+type (
+ // Resources circuit breaker base config info
+ Resources struct {
Review comment:
可以和ratelimit 的flow.rule一样,直接引用circuitbreaker.rule吗
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-pixiu] codecov-commenter edited a comment on pull request #364: feat:circuit breaker
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #364:
URL: https://github.com/apache/dubbo-go-pixiu/pull/364#issuecomment-1046194539
# [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#364](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0e0e15f) into [develop](https://codecov.io/gh/apache/dubbo-go-pixiu/commit/53052c701729ed043eab0a2b4a4418bda9273ada?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (53052c7) will **decrease** coverage by `0.28%`.
> The diff coverage is `60.00%`.
[](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## develop #364 +/- ##
===========================================
- Coverage 39.66% 39.37% -0.29%
===========================================
Files 52 49 -3
Lines 3061 3058 -3
===========================================
- Hits 1214 1204 -10
- Misses 1717 1718 +1
- Partials 130 136 +6
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [pkg/filter/sentinel/ratelimit/mock.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9yYXRlbGltaXQvbW9jay5nbw==) | `0.00% <0.00%> (ø)` | |
| [.../filter/sentinel/circuitbreaker/circuit\_breaker.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9jaXJjdWl0YnJlYWtlci9jaXJjdWl0X2JyZWFrZXIuZ28=) | `66.12% <66.12%> (ø)` | |
| [pkg/filter/sentinel/ratelimit/rate\_limit.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9yYXRlbGltaXQvcmF0ZV9saW1pdC5nbw==) | `55.81% <100.00%> (ø)` | |
| [pkg/filter/sentinel/exact.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9leGFjdC5nbw==) | | |
| [pkg/filter/sentinel/logger\_warpper.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9sb2dnZXJfd2FycHBlci5nbw==) | | |
| [pkg/filter/sentinel/matcher.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9tYXRjaGVyLmdv) | | |
| [pkg/filter/sentinel/regex.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9yZWdleC5nbw==) | | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [53052c7...0e0e15f](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-pixiu] codecov-commenter edited a comment on pull request #364: feat:circuit breaker
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #364:
URL: https://github.com/apache/dubbo-go-pixiu/pull/364#issuecomment-1046194539
# [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#364](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b990d7e) into [develop](https://codecov.io/gh/apache/dubbo-go-pixiu/commit/6131cee6047b79ea3a5499374529ac434810cce8?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (6131cee) will **decrease** coverage by `0.38%`.
> The diff coverage is `57.14%`.
> :exclamation: Current head b990d7e differs from pull request most recent head f1b1c18. Consider uploading reports for the commit f1b1c18 to get more accurate results
[](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## develop #364 +/- ##
===========================================
- Coverage 39.66% 39.27% -0.39%
===========================================
Files 52 49 -3
Lines 3061 3053 -8
===========================================
- Hits 1214 1199 -15
- Misses 1717 1718 +1
- Partials 130 136 +6
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [pkg/filter/sentinel/ratelimit/mock.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9yYXRlbGltaXQvbW9jay5nbw==) | `0.00% <0.00%> (ø)` | |
| [.../filter/sentinel/circuitbreaker/circuit\_breaker.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9jaXJjdWl0YnJlYWtlci9jaXJjdWl0X2JyZWFrZXIuZ28=) | `63.15% <63.15%> (ø)` | |
| [pkg/filter/sentinel/ratelimit/rate\_limit.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9yYXRlbGltaXQvcmF0ZV9saW1pdC5nbw==) | `55.81% <100.00%> (ø)` | |
| [pkg/filter/sentinel/exact.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9leGFjdC5nbw==) | | |
| [pkg/filter/sentinel/logger\_warpper.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9sb2dnZXJfd2FycHBlci5nbw==) | | |
| [pkg/filter/sentinel/matcher.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9tYXRjaGVyLmdv) | | |
| [pkg/filter/sentinel/regex.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9yZWdleC5nbw==) | | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [6131cee...f1b1c18](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-pixiu] codecov-commenter edited a comment on pull request #364: feat:circuit breaker
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #364:
URL: https://github.com/apache/dubbo-go-pixiu/pull/364#issuecomment-1046194539
# [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#364](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (539330c) into [develop](https://codecov.io/gh/apache/dubbo-go-pixiu/commit/53052c701729ed043eab0a2b4a4418bda9273ada?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (53052c7) will **decrease** coverage by `0.28%`.
> The diff coverage is `60.00%`.
[](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## develop #364 +/- ##
===========================================
- Coverage 39.66% 39.37% -0.29%
===========================================
Files 52 49 -3
Lines 3061 3058 -3
===========================================
- Hits 1214 1204 -10
- Misses 1717 1718 +1
- Partials 130 136 +6
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [pkg/filter/sentinel/ratelimit/mock.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9yYXRlbGltaXQvbW9jay5nbw==) | `0.00% <0.00%> (ø)` | |
| [.../filter/sentinel/circuitbreaker/circuit\_breaker.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9jaXJjdWl0YnJlYWtlci9jaXJjdWl0X2JyZWFrZXIuZ28=) | `66.12% <66.12%> (ø)` | |
| [pkg/filter/sentinel/ratelimit/rate\_limit.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9yYXRlbGltaXQvcmF0ZV9saW1pdC5nbw==) | `55.81% <100.00%> (ø)` | |
| [pkg/filter/sentinel/exact.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9leGFjdC5nbw==) | | |
| [pkg/filter/sentinel/logger\_warpper.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9sb2dnZXJfd2FycHBlci5nbw==) | | |
| [pkg/filter/sentinel/matcher.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9tYXRjaGVyLmdv) | | |
| [pkg/filter/sentinel/regex.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9yZWdleC5nbw==) | | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [53052c7...539330c](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-pixiu] codecov-commenter commented on pull request #364: feat:circuit breaker
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #364:
URL: https://github.com/apache/dubbo-go-pixiu/pull/364#issuecomment-1046194539
# [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#364](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (608addb) into [develop](https://codecov.io/gh/apache/dubbo-go-pixiu/commit/3f4672f272f18b617cde4a799e1caff6b9eae103?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3f4672f) will **decrease** coverage by `0.28%`.
> The diff coverage is `60.00%`.
[](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## develop #364 +/- ##
===========================================
- Coverage 39.66% 39.37% -0.29%
===========================================
Files 52 49 -3
Lines 3061 3058 -3
===========================================
- Hits 1214 1204 -10
- Misses 1717 1718 +1
- Partials 130 136 +6
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [pkg/filter/sentinel/ratelimit/mock.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9yYXRlbGltaXQvbW9jay5nbw==) | `0.00% <0.00%> (ø)` | |
| [.../filter/sentinel/circuitbreaker/circuit\_breaker.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9jaXJjdWl0YnJlYWtlci9jaXJjdWl0X2JyZWFrZXIuZ28=) | `66.12% <66.12%> (ø)` | |
| [pkg/filter/sentinel/ratelimit/rate\_limit.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9yYXRlbGltaXQvcmF0ZV9saW1pdC5nbw==) | `55.81% <100.00%> (ø)` | |
| [pkg/filter/sentinel/exact.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9leGFjdC5nbw==) | | |
| [pkg/filter/sentinel/logger\_warpper.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9sb2dnZXJfd2FycHBlci5nbw==) | | |
| [pkg/filter/sentinel/matcher.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9tYXRjaGVyLmdv) | | |
| [pkg/filter/sentinel/regex.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9yZWdleC5nbw==) | | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [3f4672f...608addb](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-pixiu] codecov-commenter edited a comment on pull request #364: feat:circuit breaker
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #364:
URL: https://github.com/apache/dubbo-go-pixiu/pull/364#issuecomment-1046194539
# [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#364](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (608addb) into [develop](https://codecov.io/gh/apache/dubbo-go-pixiu/commit/3f4672f272f18b617cde4a799e1caff6b9eae103?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3f4672f) will **decrease** coverage by `0.28%`.
> The diff coverage is `60.00%`.
[](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## develop #364 +/- ##
===========================================
- Coverage 39.66% 39.37% -0.29%
===========================================
Files 52 49 -3
Lines 3061 3058 -3
===========================================
- Hits 1214 1204 -10
- Misses 1717 1718 +1
- Partials 130 136 +6
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [pkg/filter/sentinel/ratelimit/mock.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9yYXRlbGltaXQvbW9jay5nbw==) | `0.00% <0.00%> (ø)` | |
| [.../filter/sentinel/circuitbreaker/circuit\_breaker.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9jaXJjdWl0YnJlYWtlci9jaXJjdWl0X2JyZWFrZXIuZ28=) | `66.12% <66.12%> (ø)` | |
| [pkg/filter/sentinel/ratelimit/rate\_limit.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9yYXRlbGltaXQvcmF0ZV9saW1pdC5nbw==) | `55.81% <100.00%> (ø)` | |
| [pkg/filter/sentinel/exact.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9leGFjdC5nbw==) | | |
| [pkg/filter/sentinel/logger\_warpper.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9sb2dnZXJfd2FycHBlci5nbw==) | | |
| [pkg/filter/sentinel/matcher.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9tYXRjaGVyLmdv) | | |
| [pkg/filter/sentinel/regex.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9yZWdleC5nbw==) | | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [3f4672f...608addb](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-pixiu] codecov-commenter edited a comment on pull request #364: feat:circuit breaker
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #364:
URL: https://github.com/apache/dubbo-go-pixiu/pull/364#issuecomment-1046194539
# [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#364](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (539330c) into [develop](https://codecov.io/gh/apache/dubbo-go-pixiu/commit/53052c701729ed043eab0a2b4a4418bda9273ada?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (53052c7) will **decrease** coverage by `0.28%`.
> The diff coverage is `60.00%`.
[](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## develop #364 +/- ##
===========================================
- Coverage 39.66% 39.37% -0.29%
===========================================
Files 52 49 -3
Lines 3061 3058 -3
===========================================
- Hits 1214 1204 -10
- Misses 1717 1718 +1
- Partials 130 136 +6
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [pkg/filter/sentinel/ratelimit/mock.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9yYXRlbGltaXQvbW9jay5nbw==) | `0.00% <0.00%> (ø)` | |
| [.../filter/sentinel/circuitbreaker/circuit\_breaker.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9jaXJjdWl0YnJlYWtlci9jaXJjdWl0X2JyZWFrZXIuZ28=) | `66.12% <66.12%> (ø)` | |
| [pkg/filter/sentinel/ratelimit/rate\_limit.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9yYXRlbGltaXQvcmF0ZV9saW1pdC5nbw==) | `55.81% <100.00%> (ø)` | |
| [pkg/filter/sentinel/exact.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9leGFjdC5nbw==) | | |
| [pkg/filter/sentinel/logger\_warpper.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9sb2dnZXJfd2FycHBlci5nbw==) | | |
| [pkg/filter/sentinel/matcher.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9tYXRjaGVyLmdv) | | |
| [pkg/filter/sentinel/regex.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9yZWdleC5nbw==) | | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [53052c7...539330c](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-pixiu] AlexStocks commented on pull request #364: feat:circuit breaker
Posted by GitBox <gi...@apache.org>.
AlexStocks commented on pull request #364:
URL: https://github.com/apache/dubbo-go-pixiu/pull/364#issuecomment-1049493684
@binbin.zhang pls review this pr.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-pixiu] codecov-commenter edited a comment on pull request #364: feat:circuit breaker
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #364:
URL: https://github.com/apache/dubbo-go-pixiu/pull/364#issuecomment-1046194539
# [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#364](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f1b1c18) into [develop](https://codecov.io/gh/apache/dubbo-go-pixiu/commit/6131cee6047b79ea3a5499374529ac434810cce8?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (6131cee) will **decrease** coverage by `0.38%`.
> The diff coverage is `57.14%`.
[](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## develop #364 +/- ##
===========================================
- Coverage 39.66% 39.27% -0.39%
===========================================
Files 52 49 -3
Lines 3061 3053 -8
===========================================
- Hits 1214 1199 -15
- Misses 1717 1718 +1
- Partials 130 136 +6
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [pkg/filter/sentinel/ratelimit/mock.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9yYXRlbGltaXQvbW9jay5nbw==) | `0.00% <0.00%> (ø)` | |
| [.../filter/sentinel/circuitbreaker/circuit\_breaker.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9jaXJjdWl0YnJlYWtlci9jaXJjdWl0X2JyZWFrZXIuZ28=) | `63.15% <63.15%> (ø)` | |
| [pkg/filter/sentinel/ratelimit/rate\_limit.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9yYXRlbGltaXQvcmF0ZV9saW1pdC5nbw==) | `55.81% <100.00%> (ø)` | |
| [pkg/filter/sentinel/exact.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9leGFjdC5nbw==) | | |
| [pkg/filter/sentinel/logger\_warpper.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9sb2dnZXJfd2FycHBlci5nbw==) | | |
| [pkg/filter/sentinel/matcher.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9tYXRjaGVyLmdv) | | |
| [pkg/filter/sentinel/regex.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9yZWdleC5nbw==) | | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [6131cee...f1b1c18](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-pixiu] baerwang commented on a change in pull request #364: feat:circuit breaker
Posted by GitBox <gi...@apache.org>.
baerwang commented on a change in pull request #364:
URL: https://github.com/apache/dubbo-go-pixiu/pull/364#discussion_r810559800
##########
File path: pkg/filter/sentinel/config.go
##########
@@ -15,26 +15,15 @@
* limitations under the License.
*/
-package ratelimit
-
-import (
- "github.com/alibaba/sentinel-golang/core/flow"
-)
+package sentinel
const (
- EXACT MatchStrategy = 0
- REGEX MatchStrategy = 1
- ANT_PATH MatchStrategy = 2
+ EXACT MatchStrategy = iota
+ REGEX
+ AntPath
Review comment:
枚举类型的常量就不用带下划线了吧,如果是普通的常量就带下划线
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-pixiu] mark4z commented on a change in pull request #364: feat:circuit breaker
Posted by GitBox <gi...@apache.org>.
mark4z commented on a change in pull request #364:
URL: https://github.com/apache/dubbo-go-pixiu/pull/364#discussion_r810457435
##########
File path: pkg/filter/sentinel/config.go
##########
@@ -15,26 +15,15 @@
* limitations under the License.
*/
-package ratelimit
-
-import (
- "github.com/alibaba/sentinel-golang/core/flow"
-)
+package sentinel
const (
- EXACT MatchStrategy = 0
- REGEX MatchStrategy = 1
- ANT_PATH MatchStrategy = 2
+ EXACT MatchStrategy = iota
+ REGEX
+ AntPath
Review comment:
ANT_PATH?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-pixiu] codecov-commenter edited a comment on pull request #364: feat:circuit breaker
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #364:
URL: https://github.com/apache/dubbo-go-pixiu/pull/364#issuecomment-1046194539
# [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#364](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (516d37e) into [develop](https://codecov.io/gh/apache/dubbo-go-pixiu/commit/53052c701729ed043eab0a2b4a4418bda9273ada?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (53052c7) will **decrease** coverage by `0.28%`.
> The diff coverage is `60.00%`.
> :exclamation: Current head 516d37e differs from pull request most recent head 0e0e15f. Consider uploading reports for the commit 0e0e15f to get more accurate results
[](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## develop #364 +/- ##
===========================================
- Coverage 39.66% 39.37% -0.29%
===========================================
Files 52 49 -3
Lines 3061 3058 -3
===========================================
- Hits 1214 1204 -10
- Misses 1717 1718 +1
- Partials 130 136 +6
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [pkg/filter/sentinel/ratelimit/mock.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9yYXRlbGltaXQvbW9jay5nbw==) | `0.00% <0.00%> (ø)` | |
| [.../filter/sentinel/circuitbreaker/circuit\_breaker.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9jaXJjdWl0YnJlYWtlci9jaXJjdWl0X2JyZWFrZXIuZ28=) | `66.12% <66.12%> (ø)` | |
| [pkg/filter/sentinel/ratelimit/rate\_limit.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9yYXRlbGltaXQvcmF0ZV9saW1pdC5nbw==) | `55.81% <100.00%> (ø)` | |
| [pkg/filter/sentinel/exact.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9leGFjdC5nbw==) | | |
| [pkg/filter/sentinel/logger\_warpper.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9sb2dnZXJfd2FycHBlci5nbw==) | | |
| [pkg/filter/sentinel/matcher.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9tYXRjaGVyLmdv) | | |
| [pkg/filter/sentinel/regex.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9yZWdleC5nbw==) | | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [53052c7...0e0e15f](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-pixiu] ztelur merged pull request #364: feat:circuit breaker
Posted by GitBox <gi...@apache.org>.
ztelur merged pull request #364:
URL: https://github.com/apache/dubbo-go-pixiu/pull/364
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-pixiu] codecov-commenter edited a comment on pull request #364: feat:circuit breaker
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #364:
URL: https://github.com/apache/dubbo-go-pixiu/pull/364#issuecomment-1046194539
# [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#364](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ea33ad5) into [develop](https://codecov.io/gh/apache/dubbo-go-pixiu/commit/3f4672f272f18b617cde4a799e1caff6b9eae103?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3f4672f) will **decrease** coverage by `0.28%`.
> The diff coverage is `60.00%`.
[](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## develop #364 +/- ##
===========================================
- Coverage 39.66% 39.37% -0.29%
===========================================
Files 52 49 -3
Lines 3061 3058 -3
===========================================
- Hits 1214 1204 -10
- Misses 1717 1718 +1
- Partials 130 136 +6
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [pkg/filter/sentinel/ratelimit/mock.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9yYXRlbGltaXQvbW9jay5nbw==) | `0.00% <0.00%> (ø)` | |
| [.../filter/sentinel/circuitbreaker/circuit\_breaker.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9jaXJjdWl0YnJlYWtlci9jaXJjdWl0X2JyZWFrZXIuZ28=) | `66.12% <66.12%> (ø)` | |
| [pkg/filter/sentinel/ratelimit/rate\_limit.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9yYXRlbGltaXQvcmF0ZV9saW1pdC5nbw==) | `55.81% <100.00%> (ø)` | |
| [pkg/filter/sentinel/exact.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9leGFjdC5nbw==) | | |
| [pkg/filter/sentinel/logger\_warpper.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9sb2dnZXJfd2FycHBlci5nbw==) | | |
| [pkg/filter/sentinel/matcher.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9tYXRjaGVyLmdv) | | |
| [pkg/filter/sentinel/regex.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9zZW50aW5lbC9yZWdleC5nbw==) | | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [3f4672f...ea33ad5](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/364?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-pixiu] baerwang commented on a change in pull request #364: feat:circuit breaker
Posted by GitBox <gi...@apache.org>.
baerwang commented on a change in pull request #364:
URL: https://github.com/apache/dubbo-go-pixiu/pull/364#discussion_r815640611
##########
File path: pkg/filter/sentinel/circuitbreaker/config.go
##########
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package circuitbreaker
+
+import "github.com/alibaba/sentinel-golang/core/circuitbreaker"
+
+type (
+ // Resources circuit breaker base config info
+ Resources struct {
Review comment:
flow.rule 熔断器貌似用不到,我好像没有get到意思
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-pixiu] baerwang commented on a change in pull request #364: feat:circuit breaker
Posted by GitBox <gi...@apache.org>.
baerwang commented on a change in pull request #364:
URL: https://github.com/apache/dubbo-go-pixiu/pull/364#discussion_r815659927
##########
File path: pkg/filter/sentinel/circuitbreaker/config.go
##########
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package circuitbreaker
+
+import "github.com/alibaba/sentinel-golang/core/circuitbreaker"
+
+type (
+ // Resources circuit breaker base config info
+ Resources struct {
Review comment:
你意思是说,sentienl 统一定义到ratelimit的struct或者定义全局struct,给他两使用
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-pixiu] sanxun0325 commented on a change in pull request #364: feat:circuit breaker
Posted by GitBox <gi...@apache.org>.
sanxun0325 commented on a change in pull request #364:
URL: https://github.com/apache/dubbo-go-pixiu/pull/364#discussion_r815606468
##########
File path: pkg/filter/sentinel/circuitbreaker/circuit_breaker.go
##########
@@ -0,0 +1,175 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package circuitbreaker
+
+import (
+ "fmt"
+ stdHttp "net/http"
+ "strings"
+)
+
+import (
+ sentinel "github.com/alibaba/sentinel-golang/api"
+ "github.com/alibaba/sentinel-golang/core/circuitbreaker"
+ sc "github.com/alibaba/sentinel-golang/core/config"
+)
+
+import (
+ "github.com/apache/dubbo-go-pixiu/pkg/common/constant"
+ "github.com/apache/dubbo-go-pixiu/pkg/common/extension/filter"
+ "github.com/apache/dubbo-go-pixiu/pkg/context/http"
+ pkgs "github.com/apache/dubbo-go-pixiu/pkg/filter/sentinel"
+ "github.com/apache/dubbo-go-pixiu/pkg/logger"
+)
+
+const (
+ Kind = constant.HTTPCircuitBreakerFilter
+)
+
+func init() {
+ filter.RegisterHttpFilter(&Plugin{})
+}
+
+type (
+ // Plugin is http filter plugin.
+ Plugin struct {
+ }
+
+ // FilterFactory is http filter instance
+ FilterFactory struct {
+ cfg *Config
+ matcher *pkgs.Matcher
+ }
+
+ // Filter is http filter instance
+ Filter struct {
+ cfg *Config
+ matcher *pkgs.Matcher
+ }
+
+ // Config describe the config of FilterFactory
+ Config struct {
+ Rules []*pkgs.Resource `json:"rules,omitempty" yaml:"rules,omitempty"`
+ Resources []Resources `json:"resources" yaml:"resources"`
+ }
+)
+
+func (p *Plugin) Kind() string {
+ return Kind
+}
+
+func (p *Plugin) CreateFilterFactory() (filter.HttpFilterFactory, error) {
+ return &FilterFactory{cfg: &Config{}}, nil
+}
+
+func (factory *FilterFactory) PrepareFilterChain(ctx *http.HttpContext, chain filter.FilterChain) error {
+ chain.AppendDecodeFilters(&Filter{cfg: factory.cfg, matcher: factory.matcher})
+ return nil
+}
+
+func (f *Filter) Decode(ctx *http.HttpContext) filter.FilterStatus {
+
+ url := ctx.GetUrl()
+ resourceName, ok := f.matcher.Match(url)
+
+ if !ok {
+ return filter.Continue
+ }
+
+ // entry, blockErr := sentinel.Entry(resourceName, sentinel.WithResourceType(base.ResTypeAPIGateway), sentinel.WithTrafficType(base.Inbound))
+ entry, blockErr := sentinel.Entry(resourceName)
+
+ // if blockErr not nil, indicates the request was blocked by Sentinel
+ if blockErr != nil {
+ ctx.SendLocalReply(stdHttp.StatusServiceUnavailable, constant.Default503Body)
+ return filter.Stop
+ }
+ defer entry.Exit()
+ return filter.Continue
+}
+
+func (factory *FilterFactory) Config() interface{} {
+ return factory.cfg
+}
+
+func (factory *FilterFactory) Apply() error {
+ if len(factory.cfg.Rules) == 0 || len(factory.cfg.Resources) == 0 {
+ return fmt.Errorf("circuit breaker router or resources is null")
+ }
+
+ factory.resetRules()
+
+ // init matcher
+ factory.matcher = pkgs.NewMatcher()
+ factory.matcher.Load(factory.cfg.Rules)
+
+ conf := sc.NewDefaultConfig()
+ conf.Sentinel.Log.Logger = pkgs.GetWrappedLogger()
+ err := sentinel.InitWithConfig(conf)
+ if err != nil {
+ logger.Error("circuit breaker init fail ", err)
+ return err
+ }
+
+ resourcesMap := make(map[string]circuitbreaker.Rule, len(factory.cfg.Resources))
+
+ for _, rule := range factory.cfg.Resources {
+ resourcesMap[rule.Resource] = circuitbreaker.Rule{
+ Strategy: rule.Strategy,
+ RetryTimeoutMs: rule.RetryTimeoutMs,
+ MinRequestAmount: rule.MinRequestAmount,
+ StatIntervalMs: rule.StatIntervalMs,
+ StatSlidingWindowBucketCount: rule.StatSlidingWindowBucketCount,
+ MaxAllowedRtMs: rule.MaxAllowedRtMs,
+ Threshold: rule.Threshold,
+ }
+ }
+
+ rules := make([]*circuitbreaker.Rule, 0, len(factory.cfg.Rules))
+
+ for _, rule := range factory.cfg.Rules {
+ c, ok := resourcesMap[strings.Split(rule.Name, "@")[0]]
+ if !ok {
+ logger.Warn("circuit breaker resource does not exist")
+ continue
+ }
+
+ c.Resource = rule.Name
+ rules = append(rules, &c)
+ }
+
+ if _, err = circuitbreaker.LoadRules(rules); err != nil {
+ logger.Error("circuit breaker load rules fail ", err)
+ return err
+ }
+ return nil
+}
+
+func (factory *FilterFactory) resetRules() {
+
+ rules := make([]*pkgs.Resource, 0, len(factory.cfg.Rules))
+
+ for _, rule := range factory.cfg.Rules {
+ for _, item := range rule.Items {
+ rules = append(rules, &pkgs.Resource{Name: rule.Name + "@" + item.Pattern, Items: []*pkgs.Item{item}})
Review comment:
“@” 可以设置为常量
##########
File path: pkg/filter/sentinel/circuitbreaker/config.go
##########
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package circuitbreaker
+
+import "github.com/alibaba/sentinel-golang/core/circuitbreaker"
+
+type (
+ // Resources circuit breaker base config info
+ Resources struct {
Review comment:
可以和ratelimit 的flow.rule一样,直接引用circuitbreaker.rule
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-pixiu] sanxun0325 commented on a change in pull request #364: feat:circuit breaker
Posted by GitBox <gi...@apache.org>.
sanxun0325 commented on a change in pull request #364:
URL: https://github.com/apache/dubbo-go-pixiu/pull/364#discussion_r815648464
##########
File path: pkg/filter/sentinel/circuitbreaker/config.go
##########
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package circuitbreaker
+
+import "github.com/alibaba/sentinel-golang/core/circuitbreaker"
+
+type (
+ // Resources circuit breaker base config info
+ Resources struct {
Review comment:
这里定义的resources struct 就是sentienl 的Circuitbreaker.Rule ,没必要在这里再定义一遍可以直接引用,像下面的FlowRule一样
```go
// Rule api group 's rate-limit rule
Rule struct {
ID int64 `json:"id,omitempty" yaml:"id,omitempty"`
FlowRule flow.Rule `json:"flowRule,omitempty" yaml:"flowRule,omitempty"`
Enable bool `json:"enable,omitempty" yaml:"enable,omitempty"`
}`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org