Skip to content

Commit

Permalink
Merge pull request #58 from ibuildthecloud/master
Browse files Browse the repository at this point in the history
Move ratelimit from norman to wrangler
  • Loading branch information
ibuildthecloud authored Feb 2, 2020
2 parents f65ef17 + 20fe796 commit 930da60
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 930da60

Please sign in to comment.