Softanza
StartFrançais
Softanza
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 blocked
composed example
o1 = new stzRateLimiter("front")
? o1.IsBlocked("an")
#--> 0
composed from the signature, run for this page
no extension
BlockOf
[ :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_
composed example
o1 = new stzRateLimiter("front")
? o1.Name_()
#--> front
composed from the signature, run for this page
no extension
SetLimit
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 limit
composed example
o1 = new stzRateLimiter("front")
? o1.HasLimit("an")
#--> 0
composed from the signature, run for this page
no extension
Keys
(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.
composed example
o1 = new stzRateLimiter("front")
? o1.Allow("an")
#--> 1
composed from the signature, run for this page
no extension
AllowN
Admit n at once (all-or-nothing). Counts one allowed / one rejected DECISION regardless of n.
composed example
o1 = new stzRateLimiter("front")
? o1.AllowN("an", 2)
#--> 1
composed from the signature, run for this page
no extension
Available
metrics ------------------------------------------------------------ Tokens currently available for a key (a float; refills continuously). Returns -1 for an unconfigured (unlimited) key.
composed example
o1 = new stzRateLimiter("front")
? o1.Available("an")
#--> -1
composed from the signature, run for this page
no extension
AllowedCount
(no comment in the source: the name reads as a sentence) allowed count
composed example
o1 = new stzRateLimiter("front")
? o1.AllowedCount("an")
#--> 0
composed from the signature, run for this page
no extension
RejectedCount
(no comment in the source: the name reads as a sentence) rejected count
composed example
o1 = new stzRateLimiter("front")
? o1.RejectedCount("an")
#--> 0
composed from the signature, run for this page
no extension
RateOf
(no comment in the source: the name reads as a sentence) rate of
composed example
o1 = new stzRateLimiter("front")
? o1.RateOf("an")
#--> 0
composed from the signature, run for this page
no extension
BurstOf
(no comment in the source: the name reads as a sentence) burst of
composed example
o1 = new stzRateLimiter("front")
? o1.BurstOf("an")
#--> 0
composed from the signature, run for this page
no extension
Narrate
(no comment in the source: the name reads as a sentence) narrate
composed example
o1 = new stzRateLimiter("front")
? o1.Narrate()
#--> rate limiter front [0 key(s)]:
composed from the signature, run for this page
no extension
Destroy
teardown (engine buckets hold native handles)no extension