Class: Labkit::RateLimit::Result::Info

Inherits:
Data
  • Object
show all
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 raw INCR value; useful for utilization-ratio metrics remaining - requests remaining before the limit is hit (floors at 0) reset_at - best-effort UTC Time when the counter window resets

Instance Attribute Summary collapse

Instance Attribute Details

#countObject (readonly)

Returns the value of attribute count

Returns:

  • (Object)

    the current value of count



54
55
56
# File 'lib/labkit/rate_limit/result.rb', line 54

def count
  @count
end

#remainingObject (readonly)

Returns the value of attribute remaining

Returns:

  • (Object)

    the current value of remaining



54
55
56
# File 'lib/labkit/rate_limit/result.rb', line 54

def remaining
  @remaining
end

#reset_atObject (readonly)

Returns the value of attribute reset_at

Returns:

  • (Object)

    the current value of reset_at



54
55
56
# File 'lib/labkit/rate_limit/result.rb', line 54

def reset_at
  @reset_at
end

#resolved_limitObject (readonly)

Returns the value of attribute resolved_limit

Returns:

  • (Object)

    the current value of resolved_limit



54
55
56
# File 'lib/labkit/rate_limit/result.rb', line 54

def resolved_limit
  @resolved_limit
end

#resolved_periodObject (readonly)

Returns the value of attribute resolved_period

Returns:

  • (Object)

    the current value of resolved_period



54
55
56
# File 'lib/labkit/rate_limit/result.rb', line 54

def resolved_period
  @resolved_period
end