Versions in this module Expand all Collapse all v0 v0.2.0 May 15, 2026 v0.1.0 May 12, 2026 Changes in this version + var ErrRateLimited = errors.New("rate limited") + type Config struct + Burst int + Rate int + type Limiter struct + func New(cfg Config) *Limiter + func PerMinute(rpm int) *Limiter + func PerSecond(rps int) *Limiter + func (l *Limiter) Allow() bool + func (l *Limiter) Tokens() float64 + func (l *Limiter) TryAcquire(n int) bool + func (l *Limiter) Wait(ctx context.Context) error + type Manager struct + func NewManager() *Manager + func (m *Manager) Get(name string, cfg Config) *Limiter