Documentation ¶ Index ¶ func NewRateConn(conn io.ReadWriteCloser, rate *Rate) io.ReadWriteCloser type Rate func NewRate(addSize int64) *Rate func (s *Rate) Get(size int64) func (s *Rate) ReturnBucket(size int64) func (s *Rate) Start() func (s *Rate) Stop() Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func NewRateConn ¶ func NewRateConn(conn io.ReadWriteCloser, rate *Rate) io.ReadWriteCloser Types ¶ type Rate ¶ type Rate struct { NowRate int64 // contains filtered or unexported fields } func NewRate ¶ func NewRate(addSize int64) *Rate func (*Rate) Get ¶ func (s *Rate) Get(size int64) func (*Rate) ReturnBucket ¶ func (s *Rate) ReturnBucket(size int64) 回桶 func (*Rate) Start ¶ func (s *Rate) Start() func (*Rate) Stop ¶ func (s *Rate) Stop() 停止 Source Files ¶ View all Source files conn.go rate.go Click to show internal directories. Click to hide internal directories.