Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Enabled bool
DefaultRule Rule
// Rules allows per-path custom rate limit rules keyed by request path
// e.g., "/api/auth/signin": {Window: time.Minute, Max: 20}
Rules map[string]Rule
}
Config for the rate limiting service
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides rate limit checks
func NewService ¶
NewService constructs a rate limit service
func (*Service) CheckLimit ¶
CheckLimit returns true if within limit; false if exceeded
Click to show internal directories.
Click to hide internal directories.