CARVIEW |
Select Language
HTTP/2 200
date: Sun, 27 Jul 2025 10:59:56 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-repository-download: git clone https://github.com/alibaba/sentinel-golang.git
etag: W/"4b677c263d228b51744be1026c8e144e"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=wWIaGsPIGnOr9Dq90WrWb%2BMsdSI%2FMCHUq0bXdyfrRId9wsKYqU%2BdrZsx0%2BUQfQ2A%2B7X1wlZy0RvQGUQpu%2BocfT3f74GeHGwVsNI4HNtAJnjKu4Iaxm%2BRxcf%2Bh4BY9cyZyQR34xX9pvBxlXaeUJH3jphOdvBSCWPBdR0t3rIgjt98pLlb0bfi%2FdH7%2FAzrJMyiCLvi8ZLgyODzJceu9HbSdhUtLHQ2CCxF0rswKY9XCKBok%2FAPGK0pNPt2WKOKHivBFvTWsP0RNm8%2FKMsPcRq3Jw%3D%3D--TzqPjKH8AxgQew7f--U6JQb8AZeab3fc4INtG67A%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1063930731.1753613995; Path=/; Domain=github.com; Expires=Mon, 27 Jul 2026 10:59:55 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Mon, 27 Jul 2026 10:59:55 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: CD4A:3C6DB4:40FB67:576A22:688606AB
Support arbitrary statistic duration for flow control and refactor in… · alibaba/sentinel-golang@4e8f5a0 · GitHub
Copy file name to clipboardExpand all lines: adapter/echo/middleware_test.go
Copy file name to clipboardExpand all lines: adapter/gin/middleware_test.go
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 445
Commit 4e8f5a0
authored
Support arbitrary statistic duration for flow control and refactor internal implementation (#200)
* Support arbitrary statistic duration for flow control. Add `StatIntervalInMs` attribute in flow.Rule. When StatIntervalInMs > globalInterval or < bucketLength, we create a new sliding window for it.
* Add stat reuse mechanism for flow rules
* Make threshold of flow rule "request amount per interval" rather than QPS.
* Refine internal implementation1 parent 7ddba92 commit 4e8f5a0Copy full SHA for 4e8f5a0
File tree
Expand file treeCollapse file tree
24 files changed
+834
-213
lines changedFilter options
- adapter
- echo
- gin
- api
- core
- base
- config
- flow
- stat
- base
- tests/testdata/extension/helper
Expand file treeCollapse file tree
24 files changed
+834
-213
lines changedadapter/echo/middleware_test.go
Copy file name to clipboardExpand all lines: adapter/echo/middleware_test.go+2Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
24 | 24 |
| |
25 | 25 |
| |
26 | 26 |
| |
| 27 | + | |
27 | 28 |
| |
28 | 29 |
| |
29 | 30 |
| |
30 | 31 |
| |
31 | 32 |
| |
32 | 33 |
| |
| 34 | + | |
33 | 35 |
| |
34 | 36 |
| |
35 | 37 |
| |
|
adapter/gin/middleware_test.go
Copy file name to clipboardExpand all lines: adapter/gin/middleware_test.go+2Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
24 | 24 |
| |
25 | 25 |
| |
26 | 26 |
| |
| 27 | + | |
27 | 28 |
| |
28 | 29 |
| |
29 | 30 |
| |
30 | 31 |
| |
31 | 32 |
| |
32 | 33 |
| |
| 34 | + | |
33 | 35 |
| |
34 | 36 |
| |
35 | 37 |
| |
|
+1Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
38 | 38 |
| |
39 | 39 |
| |
40 | 40 |
| |
| 41 | + | |
41 | 42 |
| |
42 | 43 |
|
+48-1Lines changed: 48 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
3 | 7 |
| |
4 | 8 |
| |
5 | 9 |
| |
| |||
31 | 35 |
| |
32 | 36 |
| |
33 | 37 |
| |
34 |
| - | |
| 38 | + | |
35 | 39 |
| |
36 | 40 |
| |
37 | 41 |
| |
| |||
46 | 50 |
| |
47 | 51 |
| |
48 | 52 |
| |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
49 | 96 |
|
+23-2Lines changed: 23 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 |
| - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
4 | 9 |
| |
5 | 10 |
| |
6 | 11 |
| |
7 | 12 |
| |
8 | 13 |
| |
9 |
| - | |
| 14 | + | |
10 | 15 |
| |
11 | 16 |
| |
12 | 17 |
| |
| |||
64 | 69 |
| |
65 | 70 |
| |
66 | 71 |
| |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + |
+19Lines changed: 19 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
205 | 205 |
| |
206 | 206 |
| |
207 | 207 |
| |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + |
+33Lines changed: 33 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
| 7 | + | |
7 | 8 |
| |
8 | 9 |
| |
9 | 10 |
| |
| |||
52 | 53 |
| |
53 | 54 |
| |
54 | 55 |
| |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
55 | 65 |
| |
56 | 66 |
| |
57 | 67 |
| |
| |||
84 | 94 |
| |
85 | 95 |
| |
86 | 96 |
| |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
87 | 101 |
| |
88 | 102 |
| |
89 | 103 |
| |
| |||
117 | 131 |
| |
118 | 132 |
| |
119 | 133 |
| |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
120 | 138 |
| |
121 | 139 |
| |
122 | 140 |
| |
| |||
168 | 186 |
| |
169 | 187 |
| |
170 | 188 |
| |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + |
+41-9Lines changed: 41 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
70 | 70 |
| |
71 | 71 |
| |
72 | 72 |
| |
73 |
| - | |
74 |
| - | |
75 |
| - | |
76 |
| - | |
77 |
| - | |
78 |
| - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
79 | 111 |
| |
80 | 112 |
| |
81 | 113 |
| |
82 | 114 |
| |
83 | 115 |
| |
84 | 116 |
| |
85 | 117 |
| |
86 |
| - | |
87 |
| - | |
88 |
| - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
89 | 121 |
| |
90 | 122 |
| |
91 | 123 |
| |
|
You can’t perform that action at this time.
0 commit comments