Skip to content

chore: update adaptor dependency #566

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions core/fallback/rule_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ package fallback

import (
"encoding/json"
"github.com/alibaba/sentinel-golang/logging"
"github.com/alibaba/sentinel-golang/util"
"reflect"
"sync"

"github.com/alibaba/sentinel-golang/logging"
"github.com/alibaba/sentinel-golang/util"
)

var (
Expand Down
3 changes: 2 additions & 1 deletion core/fallback/rule_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
package fallback

import (
"github.com/stretchr/testify/assert"
"testing"

"github.com/stretchr/testify/assert"
)

func TestLoadRule(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions pkg/adapters/echo/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ module github.com/alibaba/sentinel-golang/pkg/adapters/echo
go 1.13

require (
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect
github.com/alibaba/sentinel-golang v1.0.2
github.com/alibaba/sentinel-golang v1.0.5-aliyun-alpha
github.com/go-ole/go-ole v1.2.5 // indirect
github.com/labstack/echo/v4 v4.1.17
github.com/stretchr/testify v1.7.0
Expand Down
383 changes: 373 additions & 10 deletions pkg/adapters/echo/go.sum

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pkg/adapters/fiber/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.13

require (
github.com/StackExchange/wmi v1.2.1 // indirect
github.com/alibaba/sentinel-golang v1.0.2
github.com/alibaba/sentinel-golang v1.0.5-aliyun-alpha
github.com/gofiber/fiber/v2 v2.37.1
github.com/stretchr/testify v1.5.1
github.com/stretchr/testify v1.6.1
)
390 changes: 380 additions & 10 deletions pkg/adapters/fiber/go.sum

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions pkg/adapters/gear/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ module github.com/alibaba/sentinel-golang/pkg/adapters/gear
go 1.13

require (
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect
github.com/alibaba/sentinel-golang v1.0.2
github.com/alibaba/sentinel-golang v1.0.5-aliyun-alpha
github.com/go-ole/go-ole v1.2.5 // indirect
github.com/stretchr/testify v1.7.0
github.com/teambition/gear v1.24.0
Expand Down
319 changes: 312 additions & 7 deletions pkg/adapters/gear/go.sum

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions pkg/adapters/gin/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ module github.com/alibaba/sentinel-golang/pkg/adapters/gin
go 1.13

require (
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect
github.com/alibaba/sentinel-golang v1.0.2
github.com/alibaba/sentinel-golang v1.0.5-aliyun-alpha
github.com/gin-gonic/gin v1.7.0
github.com/go-ole/go-ole v1.2.5 // indirect
github.com/stretchr/testify v1.7.0
Expand Down
387 changes: 374 additions & 13 deletions pkg/adapters/gin/go.sum

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions pkg/adapters/gin/middleware_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ func initSentinel(t *testing.T) {
fallback.FlowType,
},
},
FallbackBehavior: []byte("{\"webFallbackMode\":0,\"webRespContentType\":1,\"webRespMessage\":\"{\\n \\\"abc\\\": 123\\n}\",\"webRespStatusCode\":400}"),
FallbackBehavior: &fallback.WebBlockFallbackBehavior{
WebFallbackMode: 0,
WebRespContentType: 1,
WebRespStatusCode: 429,
WebRespMessage: "{\n \"abc\": 123\n}",
},
},
})
if err != nil {
Expand Down Expand Up @@ -149,7 +154,7 @@ func TestSentinelMiddleware(t *testing.T) {
body: nil,
},
want: want{
code: http.StatusBadRequest,
code: http.StatusTooManyRequests,
},
},
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/adapters/go-zero/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/alibaba/sentinel-golang/pkg/adapters/go-zero
go 1.17

require (
github.com/alibaba/sentinel-golang v1.0.2
github.com/alibaba/sentinel-golang v1.0.5-aliyun-alpha
github.com/stretchr/testify v1.7.0
github.com/zeromicro/go-zero v1.3.0
)
Expand Down
193 changes: 193 additions & 0 deletions pkg/adapters/go-zero/go.sum

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions pkg/adapters/grpc/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ module github.com/alibaba/sentinel-golang/pkg/adapters/grpc
go 1.13

require (
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect
github.com/alibaba/sentinel-golang v1.0.2
github.com/alibaba/sentinel-golang v1.0.5-aliyun-alpha
github.com/go-ole/go-ole v1.2.5 // indirect
github.com/stretchr/testify v1.5.1
github.com/stretchr/testify v1.6.1
google.golang.org/grpc v1.34.0
)
350 changes: 331 additions & 19 deletions pkg/adapters/grpc/go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/adapters/hertz/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/alibaba/sentinel-golang/pkg/adapters/hertz
go 1.16

require (
github.com/alibaba/sentinel-golang v1.0.4
github.com/alibaba/sentinel-golang v1.0.5-aliyun-alpha
github.com/cloudwego/hertz v0.2.0
github.com/stretchr/testify v1.8.0
)
4 changes: 2 additions & 2 deletions pkg/adapters/hertz/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
github.com/alibaba/sentinel-golang v1.0.4 h1:i0wtMvNVdy7vM4DdzYrlC4r/Mpk1OKUUBurKKkWhEo8=
github.com/alibaba/sentinel-golang v1.0.4/go.mod h1:Lag5rIYyJiPOylK8Kku2P+a23gdKMMqzQS7wTnjWEpk=
github.com/alibaba/sentinel-golang v1.0.5-aliyun-alpha h1:8bklTmcFvme7nTps1F7q4Yhx9Sw7Q3GlfrJtVeArG8w=
github.com/alibaba/sentinel-golang v1.0.5-aliyun-alpha/go.mod h1:Beo3qQ/ygtZ/R4w+VtGi9OSVDVyV513YGdzgS6ZWMAY=
github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
Expand Down
2 changes: 1 addition & 1 deletion pkg/adapters/iris/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/alibaba/sentinel-golang/pkg/adapters/iris/v12
go 1.20

require (
github.com/alibaba/sentinel-golang v1.0.4
github.com/alibaba/sentinel-golang v1.0.5-aliyun-alpha
github.com/kataras/iris/v12 v12.2.0
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/adapters/iris/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
github.com/alibaba/sentinel-golang v1.0.4 h1:i0wtMvNVdy7vM4DdzYrlC4r/Mpk1OKUUBurKKkWhEo8=
github.com/alibaba/sentinel-golang v1.0.4/go.mod h1:Lag5rIYyJiPOylK8Kku2P+a23gdKMMqzQS7wTnjWEpk=
github.com/alibaba/sentinel-golang v1.0.5-aliyun-alpha h1:8bklTmcFvme7nTps1F7q4Yhx9Sw7Q3GlfrJtVeArG8w=
github.com/alibaba/sentinel-golang v1.0.5-aliyun-alpha/go.mod h1:Beo3qQ/ygtZ/R4w+VtGi9OSVDVyV513YGdzgS6ZWMAY=
github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs=
github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
Expand Down
2 changes: 1 addition & 1 deletion pkg/adapters/kitex/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/alibaba/sentinel-golang/pkg/adapters/kitex
go 1.16

require (
github.com/alibaba/sentinel-golang v1.0.4
github.com/alibaba/sentinel-golang v1.0.5-aliyun-alpha
github.com/cloudwego/kitex v0.3.4
github.com/cloudwego/kitex-examples v0.1.0
github.com/stretchr/testify v1.7.0
Expand Down
4 changes: 2 additions & 2 deletions pkg/adapters/kitex/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
github.com/alibaba/sentinel-golang v1.0.4 h1:i0wtMvNVdy7vM4DdzYrlC4r/Mpk1OKUUBurKKkWhEo8=
github.com/alibaba/sentinel-golang v1.0.4/go.mod h1:Lag5rIYyJiPOylK8Kku2P+a23gdKMMqzQS7wTnjWEpk=
github.com/alibaba/sentinel-golang v1.0.5-aliyun-alpha h1:8bklTmcFvme7nTps1F7q4Yhx9Sw7Q3GlfrJtVeArG8w=
github.com/alibaba/sentinel-golang v1.0.5-aliyun-alpha/go.mod h1:Beo3qQ/ygtZ/R4w+VtGi9OSVDVyV513YGdzgS6ZWMAY=
github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
github.com/apache/thrift v0.13.0 h1:5hryIiq9gtn+MiLVn0wP37kb/uTeRZgN08WoCsAhIhI=
github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
Expand Down
9 changes: 4 additions & 5 deletions pkg/adapters/micro/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ module github.com/alibaba/sentinel-golang/pkg/adapters/micro
go 1.13

require (
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect
github.com/alibaba/sentinel-golang v1.0.2
github.com/alibaba/sentinel-golang v1.0.5-aliyun-alpha
github.com/go-ole/go-ole v1.2.5 // indirect
github.com/golang/protobuf v1.4.2
github.com/golang/protobuf v1.4.3
github.com/micro/go-micro/v2 v2.9.1
github.com/stretchr/testify v1.5.1
)
github.com/stretchr/testify v1.6.1
)
Loading
Loading