func (t *throttlerImpl) SetMaxThrottleDuration(max time.Duration) {
	t.maxThrottleDuration = max
}
SetMaxThrottleDuration is used to set the max duration
package outputhost
import (
	"time"
)
const (
	defaultMinThrottleSleepDuration = 1 * time.Millisecond  
	defaultMaxThrottleSleepDuration = 1 * time.Minute       
	defaultBackoffCoefficient       = 1.1                   
	defaultNoSleepDuration          = 0 * time.Second
)
type (
	Throttler interface {
		SetBackoffCoefficient(backoffCoefficient float64)
		SetMaxThrottleDuration(max time.Duration)
		SetMinThrottleDuration(min time.Duration)
		GetCurrentSleepDuration() time.Duration
		GetNextSleepDuration() time.Duration
		ResetSleepDuration() time.Duration
		IsCurrentSleepDurationAtMaximum() bool
	}
	throttlerImpl struct {
		minThrottleDuration     time.Duration
		maxThrottleDuration     time.Duration
		backoffCoefficient      float64
		currentThrottleDuration time.Duration
	}
)
func newThrottler() Throttler {
	return &throttlerImpl{
		minThrottleDuration:     defaultMinThrottleSleepDuration,
		maxThrottleDuration:     defaultMaxThrottleSleepDuration,
		backoffCoefficient:      defaultBackoffCoefficient,
		currentThrottleDuration: defaultNoSleepDuration,
	}
}
func (t *throttlerImpl) GetNextSleepDuration() time.Duration {
	slowDown := t.currentThrottleDuration
	if slowDown <= defaultNoSleepDuration {
		slowDown = t.minThrottleDuration
	} else {
		slowDown = time.Duration(float64(slowDown) * t.backoffCoefficient)
	}
	if slowDown > t.maxThrottleDuration {
		slowDown = t.maxThrottleDuration
	}
	t.currentThrottleDuration = slowDown
	return t.currentThrottleDuration
}
func (t *throttlerImpl) SetBackoffCoefficient(backoffCoefficient float64) {
	t.backoffCoefficient = backoffCoefficient
}