Documentation ¶
Index ¶
- Constants
- type SProxyReader
- func (self *SProxyReader) AvgRate() float64
- func (self *SProxyReader) Percent() float64
- func (self *SProxyReader) Rate() float64
- func (self *SProxyReader) Read(p []byte) (n int, err error)
- func (self *SProxyReader) SetCallback(callback func())
- func (self *SProxyReader) SetRateLimit(mb int)
- func (self *SProxyReader) SetRefreshRate(rate time.Duration)
Constants ¶
View Source
const (
BURSTS = 1024 * 1024 * 1024
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SProxyReader ¶
type SProxyReader struct {
// contains filtered or unexported fields
}
func NewProxyReader ¶
func NewProxyReader(reader io.Reader, size int64) *SProxyReader
func (*SProxyReader) AvgRate ¶
func (self *SProxyReader) AvgRate() float64
func (*SProxyReader) Percent ¶
func (self *SProxyReader) Percent() float64
func (*SProxyReader) Rate ¶
func (self *SProxyReader) Rate() float64
func (*SProxyReader) SetCallback ¶
func (self *SProxyReader) SetCallback(callback func())
func (*SProxyReader) SetRateLimit ¶
func (self *SProxyReader) SetRateLimit(mb int)
func (*SProxyReader) SetRefreshRate ¶
func (self *SProxyReader) SetRefreshRate(rate time.Duration)
设置刷新频率 仅在读取数据前生效
Click to show internal directories.
Click to hide internal directories.