diff --git a/README.md b/README.md index 12d63f2..fc65db3 100644 --- a/README.md +++ b/README.md @@ -193,7 +193,7 @@ var transport = loadshedtransport.New( ### Aggregator -The Aggregator enables injection of custom metrics that are not already included in this package. The option relies on the Aggregator interface provided by github.com/asecurityteam/rolling and the given aggregator must return a value that is a percentage of requests to reject between 0.0 and 1.0. +The Aggregator enables injection of custom metrics that are not already included in this package. The option relies on the Aggregator interface provided by github.com/kevinconway/rolling and the given aggregator must return a value that is a percentage of requests to reject between 0.0 and 1.0. ```golang // Inject a random amount of chaos when the system is not under load. diff --git a/concurrency.go b/concurrency.go index b965da7..46c21a0 100644 --- a/concurrency.go +++ b/concurrency.go @@ -4,7 +4,7 @@ import ( "sync" "sync/atomic" - "github.com/asecurityteam/rolling" + "github.com/kevinconway/rolling" ) // WaitGroup wraps a sync.WaitGroup to make it usable as a load shedding tool. @@ -15,7 +15,7 @@ type WaitGroup struct { // NewWaitGroup generates a specialised WaitGroup that tracks the number of // concurrent operations. This implementation also satisfies the Aggregator -// interface from github.com/asecurityteam/rolling so that this can be fed into +// interface from github.com/kevinconway/rolling so that this can be fed into // a calculation of system health. func NewWaitGroup() *WaitGroup { var w = &WaitGroup{ diff --git a/cpu.go b/cpu.go index ea96b12..c22ccd0 100644 --- a/cpu.go +++ b/cpu.go @@ -3,7 +3,7 @@ package loadshed import ( "time" - "github.com/asecurityteam/rolling" + "github.com/kevinconway/rolling" pscpu "github.com/shirou/gopsutil/cpu" ) diff --git a/cpu_test.go b/cpu_test.go index 6a29f74..720230c 100644 --- a/cpu_test.go +++ b/cpu_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/asecurityteam/rolling" + "github.com/kevinconway/rolling" ) func TestCPU(t *testing.T) { diff --git a/errorrate.go b/errorrate.go index fbf711d..d193b62 100644 --- a/errorrate.go +++ b/errorrate.go @@ -3,7 +3,7 @@ package loadshed import ( "fmt" - "github.com/asecurityteam/rolling" + "github.com/kevinconway/rolling" ) // errRate is a struct representing the different feeders and aggregators to calculate error rate diff --git a/errorrate_test.go b/errorrate_test.go index f2a981c..de07004 100644 --- a/errorrate_test.go +++ b/errorrate_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/asecurityteam/rolling" + "github.com/kevinconway/rolling" ) func TestErrorRateNoError(t *testing.T) { diff --git a/errors.go b/errors.go index dbcf099..e24e429 100644 --- a/errors.go +++ b/errors.go @@ -3,7 +3,7 @@ package loadshed import ( "fmt" - "github.com/asecurityteam/rolling" + "github.com/kevinconway/rolling" ) // Rejected is error returned when a request is rejected because of load shedding diff --git a/go.mod b/go.mod index 074b233..f7bb497 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,10 @@ -module github.com/asecurityteam/loadshed +module github.com/kevinconway/loadshed go 1.12 require ( - github.com/asecurityteam/rolling v0.0.0-20171031124617-6011875bcfaf github.com/go-ole/go-ole v1.2.4 // indirect + github.com/kevinconway/rolling v1.0.0 github.com/shirou/gopsutil v0.0.0-20190731134726-d80c43f9c984 golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3 // indirect ) diff --git a/go.sum b/go.sum index 3e7ca5b..64d2e6e 100644 --- a/go.sum +++ b/go.sum @@ -1,15 +1,18 @@ github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= -github.com/asecurityteam/rolling v0.0.0-20171031124617-6011875bcfaf h1:PxQPQyJ+I7UzghgRC8TlRGldFGRgJ/NB4DAoQF0Cs8U= -github.com/asecurityteam/rolling v0.0.0-20171031124617-6011875bcfaf/go.mod h1:2D4ba5ZfYCWrIMleUgTvc8pmLExEuvu3PDwl+vnG58Q= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= github.com/go-ole/go-ole v1.2.4 h1:nNBDSCOigTSiarFpYE9J/KtEA1IOW4CNeqT9TQDqCxI= github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM= +github.com/kevinconway/rolling v1.0.0 h1:B+m6I03UDYe3Efu30PJufjCOr8065BRwCMAZg6BHwvc= +github.com/kevinconway/rolling v1.0.0/go.mod h1:44JA4JzBoc06020WuNUK/NTjNWqaAc6B8ZoBJuM8LN4= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/shirou/gopsutil v0.0.0-20190731134726-d80c43f9c984 h1:wsZAb4P8F7uQSwsnxE1gk9AHCcc5U0wvyDzcLwFY0Eo= github.com/shirou/gopsutil v0.0.0-20190731134726-d80c43f9c984/go.mod h1:WWnYX4lzhCH5h/3YBfyVA3VbLYjlMZZAQcW9ojMexNc= github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc= +github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3 h1:4y9KwBHBgBNwDbtu44R5o1fdOCQUEXhbk/P4A9WmJq0= diff --git a/latency.go b/latency.go index 23e43fd..99427ac 100644 --- a/latency.go +++ b/latency.go @@ -3,7 +3,7 @@ package loadshed import ( "time" - "github.com/asecurityteam/rolling" + "github.com/kevinconway/rolling" ) type latencyDecorator struct { diff --git a/latency_test.go b/latency_test.go index 2751cf7..483d741 100644 --- a/latency_test.go +++ b/latency_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/asecurityteam/rolling" + "github.com/kevinconway/rolling" ) func TestLatencyDecorator(t *testing.T) { diff --git a/loadshed.go b/loadshed.go index 0a96330..9ded2ff 100644 --- a/loadshed.go +++ b/loadshed.go @@ -5,7 +5,7 @@ import ( "math/rand" "time" - "github.com/asecurityteam/rolling" + "github.com/kevinconway/rolling" ) // Doer is an interface representing load shedding interface with Do method diff --git a/loadshed_test.go b/loadshed_test.go index 6381a99..a5b0d5e 100644 --- a/loadshed_test.go +++ b/loadshed_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/asecurityteam/rolling" + "github.com/kevinconway/rolling" ) func TestCPUOption(t *testing.T) { diff --git a/wrappers/middleware/middleware.go b/wrappers/middleware/middleware.go index edbffe2..1d4c0a5 100644 --- a/wrappers/middleware/middleware.go +++ b/wrappers/middleware/middleware.go @@ -5,8 +5,8 @@ import ( "fmt" "net/http" - "github.com/asecurityteam/loadshed" - "github.com/asecurityteam/rolling" + "github.com/kevinconway/loadshed" + "github.com/kevinconway/rolling" ) // Option is a wrapper for middleware diff --git a/wrappers/middleware/middleware_test.go b/wrappers/middleware/middleware_test.go index dfda8b7..26e32b0 100644 --- a/wrappers/middleware/middleware_test.go +++ b/wrappers/middleware/middleware_test.go @@ -7,7 +7,7 @@ import ( "sync/atomic" "testing" - "github.com/asecurityteam/loadshed" + "github.com/kevinconway/loadshed" ) func TestMiddleware(t *testing.T) { diff --git a/wrappers/transport/transport.go b/wrappers/transport/transport.go index 18c2627..3ddeb92 100644 --- a/wrappers/transport/transport.go +++ b/wrappers/transport/transport.go @@ -4,8 +4,8 @@ import ( "context" "net/http" - "github.com/asecurityteam/loadshed" - "github.com/asecurityteam/rolling" + "github.com/kevinconway/loadshed" + "github.com/kevinconway/rolling" ) // Option is a wrapper around the transport modifying its behavior diff --git a/wrappers/transport/transport_test.go b/wrappers/transport/transport_test.go index 83b69cc..dac0aa4 100644 --- a/wrappers/transport/transport_test.go +++ b/wrappers/transport/transport_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/asecurityteam/loadshed" + "github.com/kevinconway/loadshed" ) type fixtureTransport struct {