Commit Graph

6 Commits

Author SHA1 Message Date
ginuerzh 9bbd7da526 fix(limiter/rate): short-circuit Allow on denial, add missing httpLoader.Close, doc comments, tests
- limiterGroup.Allow(): return false immediately on first denial instead of
  continuing through all limiters (wasting tokens on subsequent limiters).
  Sort limiters by Limit() so most restrictive fires first.
- rateLimiter.Close(): add missing httpLoader.Close() to prevent resource leak.
- Add doc comments for all exported symbols (package, constants, Options,
  NewRateLimiter, NewLimiter, ErrRateLimit, generators).
- Add rate_test.go with 59 unit tests covering generators, limiter groups,
  parsing (limit/line/patterns), reload, loader merge, Close behavior,
  and priority ordering (exact IP > CIDR > $$ > $).
2026-05-24 20:09:26 +08:00
ginuerzh 4eb006f1b0 tungo: debug exec.Command output 2025-08-09 16:34:04 +08:00
ginuerzh ee2c05494c add more options for grpc 2022-12-21 18:17:46 +08:00
ginuerzh 84079e32d2 fix traffic limiter for CIDR 2022-11-05 16:10:26 +08:00
ginuerzh 5237f79740 add chain hop 2022-09-20 17:54:03 +08:00
ginuerzh 01d7dc77c6 update limiter 2022-09-14 20:00:35 +08:00