Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Limiter ¶
type Limiter interface { // Upstream returns a rate limited reader that is intended to be used in // uploads. Upstream(r io.Reader) io.Reader // Downstream returns a rate limited reader that is intended to be used // for downloads. Downstream(r io.Reader) io.Reader }
Limiter defines an interface that implementors can use to rate limit I/O according to some policy defined and configured by the implementor.
func NewStaticLimiter ¶
NewStaticLimiter constructs a Limiter with a fixed (static) upload and download rate cap
Click to show internal directories.
Click to hide internal directories.