1
0
mirror of https://github.com/rancher/norman.git synced 2025-08-10 19:52:18 +00:00
norman/pkg/ratelimit/none.go

20 lines
420 B
Go
Raw Normal View History

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 }