Skip to content

Commit

Permalink
Move ratelimit from norman to wrangler
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuildthecloud committed Feb 2, 2020
1 parent f65ef17 commit 20fe796
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions pkg/ratelimit/none.go
Original file line number Diff line number Diff line change
@@ -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 }

0 comments on commit 20fe796

Please sign in to comment.