Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Config = &ratelimitConfig{ done: make(chan struct{}), } )
Functions ¶
func New ¶
func New(opts ...RateLimitOption) error
Types ¶
type RateLimitOption ¶
type RateLimitOption func(*RateLimitOptions)
func Limit ¶
func Limit(t time.Duration) RateLimitOption
type RateLimitOptions ¶
type RateLimitOptions struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.