Class: Labkit::RateLimit::Result::Info
- Inherits:
-
Data
- Object
- Data
- Labkit::RateLimit::Result::Info
- Defined in:
- lib/labkit/rate_limit/result.rb
Overview
Per-window counter data attached to a matched Result. resolved_limit - the evaluated limit Integer for this rule resolved_period - the evaluated period Integer (seconds) for this rule count - the post-increment counter value as a Float; integer-valued
for default cost=1 callers, fractional for cost-mode callers.
Pre-2.x releases exposed this as Integer; see the migration
note in the cost-aware Lua script change.
remaining - requests remaining before the limit is hit (floors at 0).
Inherits Float typing from count when count is fractional.
reset_at - best-effort UTC Time when the counter window resets
Instance Attribute Summary collapse
-
#count ⇒ Object
readonly
Returns the value of attribute count.
-
#remaining ⇒ Object
readonly
Returns the value of attribute remaining.
-
#reset_at ⇒ Object
readonly
Returns the value of attribute reset_at.
-
#resolved_limit ⇒ Object
readonly
Returns the value of attribute resolved_limit.
-
#resolved_period ⇒ Object
readonly
Returns the value of attribute resolved_period.
Instance Attribute Details
#count ⇒ Object (readonly)
Returns the value of attribute count
59 60 61 |
# File 'lib/labkit/rate_limit/result.rb', line 59 def count @count end |
#remaining ⇒ Object (readonly)
Returns the value of attribute remaining
59 60 61 |
# File 'lib/labkit/rate_limit/result.rb', line 59 def remaining @remaining end |
#reset_at ⇒ Object (readonly)
Returns the value of attribute reset_at
59 60 61 |
# File 'lib/labkit/rate_limit/result.rb', line 59 def reset_at @reset_at end |
#resolved_limit ⇒ Object (readonly)
Returns the value of attribute resolved_limit
59 60 61 |
# File 'lib/labkit/rate_limit/result.rb', line 59 def resolved_limit @resolved_limit end |
#resolved_period ⇒ Object (readonly)
Returns the value of attribute resolved_period
59 60 61 |
# File 'lib/labkit/rate_limit/result.rb', line 59 def resolved_period @resolved_period end |