Class: Datadog::Core::RateLimiter
- Inherits:
-
Object
- Object
- Datadog::Core::RateLimiter
- Defined in:
- lib/datadog/core/rate_limiter.rb
Overview
Checks for rate limiting on a resource.
Direct Known Subclasses
Instance Method Summary collapse
-
#allow?(size = 1) ⇒ Boolean
Checks if resource of specified size can be conforms with the current limit.
-
#effective_rate ⇒ Float
The effective rate limiting ratio based on recent calls to ‘allow?`.
Instance Method Details
#allow?(size = 1) ⇒ Boolean
Checks if resource of specified size can be conforms with the current limit.
Implementations of this method are not guaranteed to be side-effect free.
16 |
# File 'lib/datadog/core/rate_limiter.rb', line 16 def allow?(size = 1); end |
#effective_rate ⇒ Float
The effective rate limiting ratio based on recent calls to ‘allow?`.
22 |
# File 'lib/datadog/core/rate_limiter.rb', line 22 def effective_rate; end |