Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadSeeker ¶
func ReadSeeker(rs io.ReadSeeker, l *Limiter) io.ReadSeeker
ReadSeeker 返回一个带有Limiter的io.ReadSeeker
Types ¶
type Limiter ¶
type Limiter struct {
// contains filtered or unexported fields
}
Limiter 速度限制器
func New ¶
New 创建Limiter Usage: limiter := New(100*1024) limiter.NewReader(reader) limiter.NewWriter(writer) limiter.NewReadSeeker(readSeeker)
func (*Limiter) NewReadSeeker ¶
func (l *Limiter) NewReadSeeker(r io.ReadSeeker) io.ReadSeeker
Click to show internal directories.
Click to hide internal directories.