Skip to content
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

Create simple version of ratelimit package #35583

Merged
merged 2 commits into from
Nov 7, 2016
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 0 additions & 4 deletions Godeps/Godeps.json

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

199 changes: 0 additions & 199 deletions Godeps/LICENSES

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

1 change: 1 addition & 0 deletions hack/.linted_packages
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ pkg/util/limitwriter
pkg/util/logs
pkg/util/maps
pkg/util/metrics
pkg/util/ratelimit
pkg/util/replicaset
pkg/util/validation/field
pkg/util/workqueue
Expand Down
2 changes: 1 addition & 1 deletion pkg/util/flowcontrol/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ go_library(
deps = [
"//pkg/util/clock:go_default_library",
"//pkg/util/integer:go_default_library",
"//vendor:github.com/juju/ratelimit",
"//pkg/util/ratelimit:go_default_library",
],
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/util/flowcontrol/throttle.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package flowcontrol
import (
"sync"

"github.com/juju/ratelimit"
"k8s.io/kubernetes/pkg/util/ratelimit"
)

type RateLimiter interface {
Expand Down
25 changes: 25 additions & 0 deletions pkg/util/ratelimit/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package(default_visibility = ["//visibility:public"])

licenses(["notice"])

load(
"@io_bazel_rules_go//go:def.bzl",
"go_binary",
"go_library",
"go_test",
"cgo_library",
)

go_library(
name = "go_default_library",
srcs = ["bucket.go"],
tags = ["automanaged"],
)

go_test(
name = "go_default_test",
srcs = ["bucket_test.go"],
library = "go_default_library",
tags = ["automanaged"],
deps = [],
)