]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Minor] Migrate lualib/plugins/ratelimit.lua to lua_shape
authorVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 18 Nov 2025 12:03:34 +0000 (12:03 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 18 Nov 2025 12:03:34 +0000 (12:03 +0000)
commitbdb6f5546ac808c5bf828bc113e38fbdb207bd67
tree3812908e752fd3a586bd106effbbbe4e57502387
parentdb4862661813c745271852f9af4943d901db3685
[Minor] Migrate lualib/plugins/ratelimit.lua to lua_shape

Replace tableshape with lua_shape in ratelimit utilities.

Changes:
- ts.shape { ... } → T.table({ ... })
- ts.number + ts.string / fn → T.one_of({T.number(), T.transform(T.string(), fn)})
- :is_optional() → :optional()
- Added comprehensive documentation to all fields

Schema: bucket_schema for ratelimit bucket with burst/rate limits,
optional symbol, message, and skip flags.
lualib/plugins/ratelimit.lua