package
Version:
v2.3.2
Opens a new window with list of versions in this module.
Published: Jul 12, 2023
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Limiter struct {
Current int32
MaxConcurrency int32
}
Limiter 并发限制
New create a concurrency limiter with MaxConcurrency=maxConcurrency
Decr decrease/release current concurrency.
GetCurrent get current concurrency
Incr increase current concurrency, if (-1, false) returned, reject request.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.