1
0
mirror of https://github.com/rancher/norman.git synced 2025-08-01 23:41:24 +00:00
norman/pkg/ratelimit/none.go
2020-01-23 22:04:14 -07:00

20 lines
420 B
Go

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 }