The library documents itself · Collections & objects
stzRateLimiter
20 own methods · 0 forms written with extensions, listed under their method
the source: base/common/stzRateLimiter.ring(opens in a new tab) · All classes · The area reference: Collections & objects
Under each method, its extensions (Q CS XT Z ZZ IB W U): bold and ticked, it exists; struck, it does not. The extensions and what they mean
Examples: 0 come from the library's tests; 11 were composed from each method's signature and run for this page, on a fresh object, for example o1 = new stzRateLimiter("front"). 9 methods have none yet. Examples run on 2026-10-03 12:54 inside the library at commit 0e72e2e2c.
Method
Explanation, as the source carries it
init
(no comment in the source: the name reads as a sentence) initno extension
Block
A limit SLOWS a key; a block STOPS it. A blocked key is refused by Allow() whether or not it has a limit -- an unconfigured key is otherwise unlimited, which is exactly the flood a responder must stop. Every refusal is recorded with the block's reason. A block made with BlockFor lifts by itself when its time is up; Block holds until Unblock.no extension
BlockFor
(no comment in the source: the name reads as a sentence) block forno extension
Unblock
(no comment in the source: the name reads as a sentence) unblockno extension
IsBlocked
(no comment in the source: the name reads as a sentence) is blockedno extension
composed example
o1 = new stzRateLimiter("front")
? o1.IsBlocked("an")
#--> 0composed from the signature, run for this pageBlockOf
[ :reason, :until, :refused ] or [] when the key is not blockedno extension
BlockedKeys
(no comment in the source: the name reads as a sentence) blocked keysno extension
Name_
(no comment in the source: the name reads as a sentence) name_no extension
composed example
o1 = new stzRateLimiter("front")
? o1.Name_()
#--> frontcomposed from the signature, run for this pageSetLimit
configuring a key -------------------------------------------------- Opt a key into rate limiting: nRatePerSec sustained, nBurst bucket capacity (max tokens = the largest instantaneous burst allowed). Re-configuring a key replaces its bucket.no extension
HasLimit
(no comment in the source: the name reads as a sentence) has limitno extension
composed example
o1 = new stzRateLimiter("front")
? o1.HasLimit("an")
#--> 0composed from the signature, run for this pageKeys
(no comment in the source: the name reads as a sentence) keysno extension
Allow
the gate ----------------------------------------------------------- Try to admit ONE request for a key. An unconfigured key is UNLIMITED (always TRUE). A configured key takes a token: TRUE while the bucket has one, FALSE (rate limited) once spent, recovering as it refills.no extension
composed example
o1 = new stzRateLimiter("front")
? o1.Allow("an")
#--> 1composed from the signature, run for this pageAllowN
Admit n at once (all-or-nothing). Counts one allowed / one rejected DECISION regardless of n.no extension
composed example
o1 = new stzRateLimiter("front")
? o1.AllowN("an", 2)
#--> 1composed from the signature, run for this pageAvailable
metrics ------------------------------------------------------------ Tokens currently available for a key (a float; refills continuously). Returns -1 for an unconfigured (unlimited) key.no extension
composed example
o1 = new stzRateLimiter("front")
? o1.Available("an")
#--> -1composed from the signature, run for this pageAllowedCount
(no comment in the source: the name reads as a sentence) allowed countno extension
composed example
o1 = new stzRateLimiter("front")
? o1.AllowedCount("an")
#--> 0composed from the signature, run for this pageRejectedCount
(no comment in the source: the name reads as a sentence) rejected countno extension
composed example
o1 = new stzRateLimiter("front")
? o1.RejectedCount("an")
#--> 0composed from the signature, run for this pageRateOf
(no comment in the source: the name reads as a sentence) rate ofno extension
composed example
o1 = new stzRateLimiter("front")
? o1.RateOf("an")
#--> 0composed from the signature, run for this pageBurstOf
(no comment in the source: the name reads as a sentence) burst ofno extension
composed example
o1 = new stzRateLimiter("front")
? o1.BurstOf("an")
#--> 0composed from the signature, run for this pageNarrate
(no comment in the source: the name reads as a sentence) narrateno extension
composed example
o1 = new stzRateLimiter("front")
? o1.Narrate()
#--> rate limiter front [0 key(s)]:composed from the signature, run for this pageDestroy
teardown (engine buckets hold native handles)no extension

