rate

package
v0.33.12 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2025 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

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)

ReturnBucket 回桶

func (*Rate) Start

func (s *Rate) Start()

Start 启动回桶

func (*Rate) Stop

func (s *Rate) Stop()

Stop 停止回桶

Jump to

Keyboard shortcuts

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