Skip to content

services/horizon: make our fork of throttled the primary dependency #1642

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 7 commits into from
Aug 26, 2019
17 changes: 8 additions & 9 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,8 @@
revision = "070c81def33f6362a8267b6a4e56fb7bf23fc6b5"

[[constraint]]
name = "github.com/throttled/throttled"
source = "https://github.com/bartekn/throttled.git"
revision = "c99eef3ad70a3be5a983770523e0e379699c805c"
name = "github.com/stellar/throttled"
revision = "89d75816f59db3124e575e96b35d4b7d927cde93"
Copy link
Member Author

@leighmcculloch leighmcculloch Aug 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm using a revision here and not a tag because it's a little confusing to introduce tags into our stellar/throttled fork if we plan for it to converge with upstream someday. This commit is on the stellar branch of that repo where our commits live.


[[constraint]]
name = "golang.org/x/crypto"
Expand Down
2 changes: 1 addition & 1 deletion services/horizon/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
apkg "github.com/stellar/go/support/app"
support "github.com/stellar/go/support/config"
"github.com/stellar/go/support/log"
"github.com/throttled/throttled"
"github.com/stellar/throttled"
)

var config horizon.Config
Expand Down
2 changes: 1 addition & 1 deletion services/horizon/internal/actions/rate_limiter_provider.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package actions

import "github.com/throttled/throttled"
import "github.com/stellar/throttled"

// RateLimiterProvider is an interface that provides access to the type's HTTPRateLimiter.
type RateLimiterProvider interface {
Expand Down
2 changes: 1 addition & 1 deletion services/horizon/internal/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"github.com/stellar/go/support/db"
"github.com/stellar/go/support/errors"
"github.com/stellar/go/support/log"
"github.com/throttled/throttled"
"github.com/stellar/throttled"
"golang.org/x/net/http2"
graceful "gopkg.in/tylerb/graceful.v1"
)
Expand Down
2 changes: 1 addition & 1 deletion services/horizon/internal/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"time"

"github.com/sirupsen/logrus"
"github.com/throttled/throttled"
"github.com/stellar/throttled"
)

// Config is the configuration for horizon. It gets populated by the
Expand Down
2 changes: 1 addition & 1 deletion services/horizon/internal/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/stellar/go/services/horizon/internal/actions"
"github.com/stellar/go/services/horizon/internal/test"
supportLog "github.com/stellar/go/support/log"
"github.com/throttled/throttled"
"github.com/stellar/throttled"
)

func NewTestApp() *App {
Expand Down
2 changes: 1 addition & 1 deletion services/horizon/internal/middleware_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"testing"

"github.com/stellar/go/services/horizon/internal/test"
"github.com/stellar/throttled"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
"github.com/throttled/throttled"
)

type RateLimitMiddlewareTestSuite struct {
Expand Down
2 changes: 1 addition & 1 deletion services/horizon/internal/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/stellar/go/support/db"
"github.com/stellar/go/support/log"
"github.com/stellar/go/support/render/problem"
"github.com/throttled/throttled"
"github.com/stellar/throttled"
)

const LRUCacheSize = 50000
Expand Down