throttle.go
func ThrottledReader(r io.Reader, bytesPerSec int, maxBurst time.Duration) ThrottlerReader {
	return &throttledReader{
		wrap:    r,
		limiter: newRateLimiter(bytesPerSec, maxBurst),
	}
}
func ThrottledReader(r io.Reader, bytesPerSec int, maxBurst time.Duration) ThrottlerReader {
	return &throttledReader{
		wrap:    r,
		limiter: newRateLimiter(bytesPerSec, maxBurst),
	}
}
func ThrottledReader ( r io . Reader , bytesPerSec int , maxBurst time . Duration ) ThrottlerReader { return & throttledReader { wrap : r , limiter : newRateLimiter ( bytesPerSec , maxBurst ) , } }
// ThrottledReader ensures that reads to `r` never exceeds a specified rate of
// bytes per second. The `maxBurst` duration changes how often the verification is
// done. The smaller the value, the less bursty, but also the more overhead there
// is to the throttling.
ThrottledReader ensures that reads to r never exceeds a specified rate of bytes per second . The maxBurst duration changes how often the verification is done . The smaller the value the less bursty but also the more overhead there is to the throttling .