package
module
Version:
v1.0.1
Opens a new window with list of versions in this module.
Published: Jan 31, 2024
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 1
Opens a new window with list of known importers.
README
¶
Documentation
¶
NewTicker returns a channel that sends a `struct{}{}`
at most `*rate` times per second.
A nil `rate` or a `*rate` of zero or less sends
as quickly as possible.
The channel is closed when the context is done.
Limiter provides efficient rate limiting. The zero value is immediately usable.
A Limiter is not safe to use from multiple goroutines simultaneously.
Wait sleeps at least long enough to ensure that the
given `*rate` of events per second is not exceeded.
A nil `rate` or a `*rate` of zero or less doesn't wait at all.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.