Skip to content

Commit

Permalink
Chore: Use dskit/limiter (#4327)
Browse files Browse the repository at this point in the history
Signed-off-by: Arve Knudsen <[email protected]>
  • Loading branch information
aknuds1 authored Sep 21, 2021
1 parent d5b6d05 commit 79b95d9
Show file tree
Hide file tree
Showing 8 changed files with 139 additions and 7 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ require (
github.com/google/go-cmp v0.5.6
github.com/gorilla/mux v1.8.0
github.com/gorilla/websocket v1.4.2
github.com/grafana/dskit v0.0.0-20210910100700-60e6d9b19675
github.com/grafana/dskit v0.0.0-20210914144857-dbbb3701e01d
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.1-0.20191002090509-6af20e3a5340 // indirect
github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1077,8 +1077,8 @@ github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0U
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY=
github.com/grafana/dskit v0.0.0-20210908150159-fcf48cb19aa4/go.mod h1:m3eHzwe5IT5eE2MI3Ena2ooU8+Hek8IiVXb9yJ1+0rs=
github.com/grafana/dskit v0.0.0-20210910100700-60e6d9b19675 h1:50UgpAdLj3aP9PWi3U1fDzYWhw+kLfaJN1RHG8/ThpY=
github.com/grafana/dskit v0.0.0-20210910100700-60e6d9b19675/go.mod h1:m3eHzwe5IT5eE2MI3Ena2ooU8+Hek8IiVXb9yJ1+0rs=
github.com/grafana/dskit v0.0.0-20210914144857-dbbb3701e01d h1:pcAtisbhl+QI+DBLhLofmLK01PnMXhm7K+vi0cSoFjU=
github.com/grafana/dskit v0.0.0-20210914144857-dbbb3701e01d/go.mod h1:m3eHzwe5IT5eE2MI3Ena2ooU8+Hek8IiVXb9yJ1+0rs=
github.com/grafana/gocql v0.0.0-20200605141915-ba5dc39ece85 h1:xLuzPoOzdfNb/RF/IENCw+oLVdZB4G21VPhkHBgwSHY=
github.com/grafana/gocql v0.0.0-20200605141915-ba5dc39ece85/go.mod h1:crI9WX6p0IhrqB+DqIUHulRW853PaNFf7o4UprV//3I=
github.com/grafana/tail v0.0.0-20201004203643-7aa4e4a91f03 h1:fGgFrAraMB0BaPfYumu+iulfDXwHm+GFyHA4xEtBqI8=
Expand Down
2 changes: 1 addition & 1 deletion pkg/distributor/distributor.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"github.com/cortexproject/cortex/pkg/ring"
ring_client "github.com/cortexproject/cortex/pkg/ring/client"
"github.com/cortexproject/cortex/pkg/tenant"
"github.com/cortexproject/cortex/pkg/util/limiter"
util_log "github.com/cortexproject/cortex/pkg/util/log"
"github.com/grafana/dskit/limiter"
"github.com/grafana/dskit/services"
lru "github.com/hashicorp/golang-lru"
"github.com/opentracing/opentracing-go"
Expand Down
2 changes: 1 addition & 1 deletion pkg/distributor/ingestion_rate_strategy.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package distributor

import (
"github.com/cortexproject/cortex/pkg/util/limiter"
"github.com/grafana/dskit/limiter"

"github.com/grafana/loki/pkg/validation"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/distributor/ingestion_rate_strategy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package distributor
import (
"testing"

"github.com/cortexproject/cortex/pkg/util/limiter"
"github.com/grafana/dskit/limiter"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
Expand Down

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

122 changes: 122 additions & 0 deletions vendor/github.com/grafana/dskit/limiter/rate_limiter.go

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

3 changes: 2 additions & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ github.com/gorilla/mux
# github.com/gorilla/websocket v1.4.2
## explicit
github.com/gorilla/websocket
# github.com/grafana/dskit v0.0.0-20210910100700-60e6d9b19675
# github.com/grafana/dskit v0.0.0-20210914144857-dbbb3701e01d
## explicit
github.com/grafana/dskit/backoff
github.com/grafana/dskit/closer
Expand All @@ -572,6 +572,7 @@ github.com/grafana/dskit/kv/consul
github.com/grafana/dskit/kv/etcd
github.com/grafana/dskit/kv/kvtls
github.com/grafana/dskit/kv/memberlist
github.com/grafana/dskit/limiter
github.com/grafana/dskit/middleware
github.com/grafana/dskit/modules
github.com/grafana/dskit/runtimeconfig
Expand Down

0 comments on commit 79b95d9

Please sign in to comment.