Class: CMDx::RateLimit::Quota
- Inherits:
-
Data
- Object
- Data
- CMDx::RateLimit::Quota
- Defined in:
- lib/cmdx/rate_limit.rb
Overview
Inputs for a limiter callable (CMDx::Limiters or limiter: Proc).
Instance Attribute Summary collapse
-
#cost ⇒ Numeric
readonly
units charged when admitted (
:leaky_bucket). -
#limiter ⇒ Symbol, #call
readonly
resolved strategy spec.
-
#max ⇒ Integer
readonly
capacity or window max from the declaration.
-
#options ⇒ Hash{Symbol => Object}
readonly
frozen declaration options.
-
#per ⇒ Integer
readonly
window or leak interval in seconds.
-
#store_key ⇒ String
readonly
base store key (limiters may append suffixes).
-
#task ⇒ Task
readonly
task being admitted.
Instance Attribute Details
#cost ⇒ Numeric (readonly)
units charged when admitted (:leaky_bucket)
40 41 42 |
# File 'lib/cmdx/rate_limit.rb', line 40 def cost @cost end |
#limiter ⇒ Symbol, #call (readonly)
resolved strategy spec
40 41 42 |
# File 'lib/cmdx/rate_limit.rb', line 40 def limiter @limiter end |
#max ⇒ Integer (readonly)
capacity or window max from the declaration
40 41 42 |
# File 'lib/cmdx/rate_limit.rb', line 40 def max @max end |
#options ⇒ Hash{Symbol => Object} (readonly)
frozen declaration options
40 41 42 |
# File 'lib/cmdx/rate_limit.rb', line 40 def @options end |
#per ⇒ Integer (readonly)
window or leak interval in seconds
40 41 42 |
# File 'lib/cmdx/rate_limit.rb', line 40 def per @per end |
#store_key ⇒ String (readonly)
base store key (limiters may append suffixes)
40 41 42 |
# File 'lib/cmdx/rate_limit.rb', line 40 def store_key @store_key end |
#task ⇒ Task (readonly)
task being admitted
40 41 42 |
# File 'lib/cmdx/rate_limit.rb', line 40 def task @task end |