Class: McpToolkit::RateLimiter::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/mcp_toolkit/rate_limiter.rb

Overview

The outcome of one #call: the throttling decision plus the values the transport renders into the X-RateLimit-* / Retry-After headers.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#allowedObject

Returns the value of attribute allowed

Returns:

  • (Object)

    the current value of allowed



31
32
33
# File 'lib/mcp_toolkit/rate_limiter.rb', line 31

def allowed
  @allowed
end

#limitObject

Returns the value of attribute limit

Returns:

  • (Object)

    the current value of limit



31
32
33
# File 'lib/mcp_toolkit/rate_limiter.rb', line 31

def limit
  @limit
end

#remainingObject

Returns the value of attribute remaining

Returns:

  • (Object)

    the current value of remaining



31
32
33
# File 'lib/mcp_toolkit/rate_limiter.rb', line 31

def remaining
  @remaining
end

#reset_atObject

Returns the value of attribute reset_at

Returns:

  • (Object)

    the current value of reset_at



31
32
33
# File 'lib/mcp_toolkit/rate_limiter.rb', line 31

def reset_at
  @reset_at
end

#retry_afterObject

Returns the value of attribute retry_after

Returns:

  • (Object)

    the current value of retry_after



31
32
33
# File 'lib/mcp_toolkit/rate_limiter.rb', line 31

def retry_after
  @retry_after
end

Instance Method Details

#allowed?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/mcp_toolkit/rate_limiter.rb', line 32

def allowed?
  allowed
end