Documentation ¶
Overview ¶
Package limiter provides concurrency limiters.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fixed ¶
type Fixed chan struct{}
Fixed is a simple channel-based concurrency limiter. It uses a fixed size channel to limit callers from proceeding until there is a value available in the channel. If all are in-use, the caller blocks until one is freed.
func (Fixed) Available ¶ added in v1.4.0
Available returns the number of available tokens that may be taken.
func (Fixed) Idle ¶ added in v1.4.0
Idle returns true if the limiter has all its capacity is available.
Click to show internal directories.
Click to hide internal directories.