Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Limiter ¶
type Limiter struct {
// contains filtered or unexported fields
}
Limiter controls the amount of budget that can be spent according to configured perSecondLimit
func NewLimiter ¶
NewLimiter creates a Limiter object for the given perSecondLimit
type WriteLimiter ¶
type WriteLimiter struct {
// contains filtered or unexported fields
}
WriteLimiter limits the amount of bytes written per second via Write() method. Must be created via NewWriteLimiter.
func NewWriteLimiter ¶
func NewWriteLimiter(w io.Writer, limiter *Limiter) *WriteLimiter
NewWriteLimiter creates a new WriteLimiter object for the give writer and Limiter.
func (*WriteLimiter) Close ¶
func (wl *WriteLimiter) Close() error
Close implements io.Closer also calls Close for wrapped io.WriteCloser
Click to show internal directories.
Click to hide internal directories.