rate

package
v0.22.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2019 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRateConn added in v0.20.0

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()

停止

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL