func NewRateLimitedFunction(backOffKey string, period time.Duration, handlerFunc HandlerFunc) *RateLimitedFunction {
	keyFunc := func(_ interface{}) (string, error) {
		return backOffKey, nil
	}
	fifo := kcache.NewFIFO(keyFunc)

	backOff := flowcontrol.NewBackOff(period, maxBackOffPeriod)

	return &RateLimitedFunction{handlerFunc, fifo, backOffKey, backOff}
}
// NewRateLimitedFunction creates a new rate limited function.
NewRateLimitedFunction creates a new rate limited function.
// NewRateLimitedFunction creates a new rate limited function .
func NewRateLimitedFunction(backOffKey string, period time.Duration, handlerFunc HandlerFunc) *RateLimitedFunction {
	keyFunc := func(_ interface{}) (string, error) {
		return backOffKey, nil
	}
	fifo := kcache.NewFIFO(keyFunc)
	backOff := flowcontrol.NewBackOff(period, maxBackOffPeriod)
	return &RateLimitedFunction{handlerFunc, fifo, backOffKey, backOff}
}
func NewRateLimitedFunction ( backOffKey string , period time . Duration , handlerFunc HandlerFunc ) * RateLimitedFunction { keyFunc := func ( _ interface { } ) ( string , error ) { return backOffKey , nil } fifo := kcache . NewFIFO ( keyFunc ) backOff := flowcontrol . NewBackOff ( period , maxBackOffPeriod ) return & RateLimitedFunction { handlerFunc , fifo , backOffKey , backOff } }
NewRateLimitedFunction creates a new rate limited function.
NewRateLimitedFunction creates a new rate limited function .