mirror of
https://github.com/kubernetes/sample-controller.git
synced 2025-02-02 10:02:51 +08:00
7df7717190
Automatic merge from submit-queue (batch tested with PRs 59158, 38320, 59059, 55516, 59357). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Switch from juju/ratelimit to golang.org/x/time/rate Replaces juju/ratelimit with golang.org/x/time/rate xref https://github.com/kubernetes/steering/issues/21 Requires removing the Saturation() method on the rate limiter. In the process of attempting to contribute it to the `golang.org/x/time/rate` implementation, it became clear that what it was calculating was not very useful when combined with periodic polling. See discussion in https://go-review.googlesource.com/c/time/+/29958#message-4caffc11669cadd90e2da4c05122cfec50ea6a22 ```release-note NONE ``` Kubernetes-commit: 0656d030a7d131ca8088a9f0ecd12596eb90d2fd
62 lines
1.5 KiB
Python
62 lines
1.5 KiB
Python
package(default_visibility = ["//visibility:public"])
|
|
|
|
load(
|
|
"@io_bazel_rules_go//go:def.bzl",
|
|
"go_library",
|
|
"go_test",
|
|
)
|
|
|
|
go_test(
|
|
name = "go_default_test",
|
|
srcs = [
|
|
"default_rate_limiters_test.go",
|
|
"delaying_queue_test.go",
|
|
"rate_limitting_queue_test.go",
|
|
],
|
|
embed = [":go_default_library"],
|
|
importpath = "k8s.io/client-go/util/workqueue",
|
|
deps = [
|
|
"//vendor/k8s.io/apimachinery/pkg/util/clock:go_default_library",
|
|
"//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library",
|
|
],
|
|
)
|
|
|
|
go_library(
|
|
name = "go_default_library",
|
|
srcs = [
|
|
"default_rate_limiters.go",
|
|
"delaying_queue.go",
|
|
"doc.go",
|
|
"metrics.go",
|
|
"parallelizer.go",
|
|
"queue.go",
|
|
"rate_limitting_queue.go",
|
|
],
|
|
importpath = "k8s.io/client-go/util/workqueue",
|
|
deps = [
|
|
"//vendor/golang.org/x/time/rate:go_default_library",
|
|
"//vendor/k8s.io/apimachinery/pkg/util/clock:go_default_library",
|
|
"//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library",
|
|
],
|
|
)
|
|
|
|
go_test(
|
|
name = "go_default_xtest",
|
|
srcs = ["queue_test.go"],
|
|
importpath = "k8s.io/client-go/util/workqueue_test",
|
|
deps = ["//vendor/k8s.io/client-go/util/workqueue:go_default_library"],
|
|
)
|
|
|
|
filegroup(
|
|
name = "package-srcs",
|
|
srcs = glob(["**"]),
|
|
tags = ["automanaged"],
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
filegroup(
|
|
name = "all-srcs",
|
|
srcs = [":package-srcs"],
|
|
tags = ["automanaged"],
|
|
)
|