Skip to content

Commit d610204

Browse files
authored
Merge pull request #13 from krakend/update_namespace
Update namespace from krakendio to krakend.
2 parents ee13365 + 14f0047 commit d610204

File tree

11 files changed

+45
-30
lines changed

11 files changed

+45
-30
lines changed

.deepsource.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ name = "go"
55
enabled = true
66

77
[analyzers.meta]
8-
import_root = "github.com/krakendio/krakend-circuitbreaker"
8+
import_root = "github.com/krakend/krakend-circuitbreaker"
99

1010
[[transformers]]
1111
name = "gofmt"

.github/workflows/go.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Set up Go
1717
uses: actions/setup-go@v2
1818
with:
19-
go-version: 1.17
19+
go-version: 1.24
2020

2121
- name: Test
2222
run: go test -v ./...

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# KrakenD circuit breakers
22

3-
A collection of circuit breaker adaptors for [KrakenD](https://github.com/krakendio/krakend-ce)
3+
A collection of circuit breaker adaptors for [KrakenD](https://github.com/krakend/krakend-ce)
44

55
### gobreaker
66

@@ -14,4 +14,4 @@ This is a simple proxy adaptor for the github.com/eapache/go-resiliency/breaker
1414

1515
1. Official: https://www.krakend.io/docs/throttling/circuit-breaker/
1616

17-
2. Autogenerated: https://godoc.org/github.com/krakendio/krakend-circuitbreaker
17+
2. Autogenerated: https://godoc.org/github.com/krakend/krakend-circuitbreaker

eapache/proxy/proxy.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Package eapache provides a circuit breaker proxy middleware using the github.com
33
44
Adding the middleware to your proxy stack
55
6-
import eapache "github.com/krakendio/krakend-circuitbreaker/eapache/proxy"
6+
import eapache "github.com/krakend/krakend-circuitbreaker/v2/eapache/proxy"
77
88
...
99
@@ -15,7 +15,6 @@ Adding the middleware to your proxy stack
1515
p = eapache.NewMiddleware(backend)(p)
1616
1717
...
18-
1918
*/
2019
package proxy
2120

@@ -25,7 +24,7 @@ import (
2524
"github.com/luraproject/lura/v2/config"
2625
"github.com/luraproject/lura/v2/proxy"
2726

28-
"github.com/krakendio/krakend-circuitbreaker/v2/eapache"
27+
"github.com/krakend/krakend-circuitbreaker/v2/eapache"
2928
)
3029

3130
// BackendFactory adds a cb middleware wrapping the internal factory

eapache/proxy/proxy_benchmark_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/luraproject/lura/v2/config"
1010
"github.com/luraproject/lura/v2/proxy"
1111

12-
"github.com/krakendio/krakend-circuitbreaker/v2/eapache"
12+
"github.com/krakend/krakend-circuitbreaker/v2/eapache"
1313
)
1414

1515
func BenchmarkNewCircuitBreakerMiddleware_ok(b *testing.B) {

eapache/proxy/proxy_test.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"github.com/luraproject/lura/v2/config"
1111
"github.com/luraproject/lura/v2/proxy"
1212

13-
"github.com/krakendio/krakend-circuitbreaker/v2/eapache"
13+
"github.com/krakend/krakend-circuitbreaker/v2/eapache"
1414
)
1515

1616
func TestNewMiddleware_multipleNext(t *testing.T) {
@@ -19,7 +19,14 @@ func TestNewMiddleware_multipleNext(t *testing.T) {
1919
t.Errorf("The code did not panic\n")
2020
}
2121
}()
22-
NewMiddleware(&config.Backend{})(proxy.NoopProxy, proxy.NoopProxy)
22+
NewMiddleware(&config.Backend{
23+
ExtraConfig: config.ExtraConfig{
24+
eapache.Namespace: map[string]interface{}{
25+
"error": 1,
26+
},
27+
},
28+
},
29+
)(proxy.NoopProxy, proxy.NoopProxy)
2330
}
2431

2532
func TestNewMiddleware_zeroConfig(t *testing.T) {

go.mod

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
module github.com/krakendio/krakend-circuitbreaker/v2
1+
module github.com/krakend/krakend-circuitbreaker/v2
22

3-
go 1.17
3+
go 1.23.0
4+
5+
toolchain go1.24.2
46

57
require (
68
github.com/eapache/go-resiliency v1.2.0
7-
github.com/luraproject/lura/v2 v2.0.5
9+
github.com/luraproject/lura/v2 v2.11.0
810
github.com/sony/gobreaker v0.4.1
911
)
1012

1113
require (
1214
github.com/davecgh/go-spew v1.1.1 // indirect
13-
github.com/krakendio/flatmap v1.1.1 // indirect
14-
github.com/stretchr/testify v1.4.0 // indirect
15+
github.com/krakend/flatmap v1.2.0 // indirect
1516
github.com/valyala/fastrand v1.1.0 // indirect
17+
golang.org/x/text v0.26.0 // indirect
1618
)

go.sum

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,21 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
33
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
44
github.com/eapache/go-resiliency v1.2.0 h1:v7g92e/KSN71Rq7vSThKaWIq68fL4YHvWyiUKorFR1Q=
55
github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
6-
github.com/krakendio/flatmap v1.1.1 h1:rGBNVpBY0pMk6cLOwerVzoKY4HELnpu0xvqB231lOCQ=
7-
github.com/krakendio/flatmap v1.1.1/go.mod h1:KBuVkiH5BcBFRa5A1HdSHDn8a8LzsyRTKZArX0vqTbo=
8-
github.com/luraproject/lura/v2 v2.0.5 h1:Mc4uj37s7mv6qRLy+Uo983CiaITPSVJYooeUilbiD+k=
9-
github.com/luraproject/lura/v2 v2.0.5/go.mod h1:r2N4j89Snm1j+Y9CCa9cYR1T2ETRL0E4y9P+DgymqX4=
6+
github.com/krakend/flatmap v1.2.0 h1:4NPncAKH7Ca/t878kbGlc/LPWLa+m4sgBhs8aT2Q1SY=
7+
github.com/krakend/flatmap v1.2.0/go.mod h1:FyCOoggdVlWr31+aQaOFvBxlMgYfCE5yuwInLbW1/jM=
8+
github.com/luraproject/lura/v2 v2.11.0 h1:8VxEZSMOG1qSX+7YciB860m+YQ0Rbkc/510MGqJiuPk=
9+
github.com/luraproject/lura/v2 v2.11.0/go.mod h1:ZUBYMsjVwPAZWVEoBtJ6keodn13tgw/5QQyY3nDkk2I=
1010
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
1111
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
1212
github.com/sony/gobreaker v0.4.1 h1:oMnRNZXX5j85zso6xCPRNPtmAycat+WcoKbklScLDgQ=
1313
github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY=
1414
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
1515
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
16-
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
17-
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
16+
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
17+
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
1818
github.com/valyala/fastrand v1.1.0 h1:f+5HkLW4rsgzdNoleUOB69hyT9IlD2ZQh9GyDMfb5G8=
1919
github.com/valyala/fastrand v1.1.0/go.mod h1:HWqCzkrkg6QXT8V2EXWvXCoow7vLwOFN002oeRzjapQ=
20-
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
21-
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
22-
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
20+
golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M=
21+
golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA=
22+
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
23+
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

gobreaker/proxy/proxy.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Adding the middleware to your proxy stack
55
66
import (
77
"github.com/devopsfaith/lura/v2/proxy"
8-
gobreaker "github.com/krakendio/krakend-circuitbreaker/gobreaker/proxy"
8+
gobreaker "github.com/krakend/krakend-circuitbreaker/gobreaker/proxy"
99
)
1010
1111
...
@@ -18,7 +18,6 @@ Adding the middleware to your proxy stack
1818
p = gobreaker.NewMiddleware(backend)(p)
1919
2020
...
21-
2221
*/
2322
package proxy
2423

@@ -30,7 +29,7 @@ import (
3029
"github.com/luraproject/lura/v2/logging"
3130
"github.com/luraproject/lura/v2/proxy"
3231

33-
gcb "github.com/krakendio/krakend-circuitbreaker/v2/gobreaker"
32+
gcb "github.com/krakend/krakend-circuitbreaker/v2/gobreaker"
3433
)
3534

3635
// BackendFactory adds a cb middleware wrapping the internal factory

gobreaker/proxy/proxy_benchmark_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/luraproject/lura/v2/config"
1010
"github.com/luraproject/lura/v2/proxy"
1111

12-
gcb "github.com/krakendio/krakend-circuitbreaker/v2/gobreaker"
12+
gcb "github.com/krakend/krakend-circuitbreaker/v2/gobreaker"
1313
"github.com/luraproject/lura/v2/logging"
1414
)
1515

0 commit comments

Comments
 (0)