diff --git a/pkg/ratelimit/none.go b/pkg/ratelimit/none.go new file mode 100644 index 00000000..e952e2ae --- /dev/null +++ b/pkg/ratelimit/none.go @@ -0,0 +1,19 @@ +package ratelimit + +import ( + "context" + + "k8s.io/client-go/util/flowcontrol" +) + +var ( + None = flowcontrol.RateLimiter((*none)(nil)) +) + +type none struct{} + +func (*none) TryAccept() bool { return true } +func (*none) Stop() {} +func (*none) Accept() {} +func (*none) QPS() float32 { return 1 } +func (*none) Wait(_ context.Context) error { return nil }