flowcontrol

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RateLimiter

type RateLimiter interface {
	Wait(count int64)
	WaitMaxDuration(count int64, maxWait time.Duration) bool
	Take(count int64) time.Duration
	TakeMaxDuration(count int64, maxWait time.Duration) (time.Duration, bool)
	TakeAvailable(count int64) int64
	TakeOneAvailable() bool
	LastTakeTime() time.Time
	Available() int64
	Capacity() int64
	Rate() float64
}

RateLimiter 限流器

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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