shad-go/ratelimit/ratelimit.go
2021-03-05 14:06:52 +03:00

22 lines
454 B
Go

// +build !solution
package ratelimit
import (
"context"
"time"
)
// Limiter is precise rate limiter with context support.
type Limiter struct {
}
// NewLimiter returns limiter that throttles rate of successful Acquire() calls
// to maxSize events at any given interval.
func NewLimiter(maxCount int, interval time.Duration) *Limiter {
panic("not implemented")
}
func (l *Limiter) Acquire(ctx context.Context) error {
panic("not implemented")
}