abstract class FailureRateLimitFunction[R <: (Request)](rateLimiter: RateLimiter, resultCheck: Result => Boolean)(implicit val executionContext: ExecutionContext) extends ActionFunction[R, R]
ActionFunction which holds a RateLimiter with a bucket for each key returned by method keyFromRequest. Tokens are consumed only by failures determined by function resultCheck. If no tokens remain, requests with this key are rejected. Can be used with any Request type. Useful if you want to use content from a wrapped request, e.g. User ID
Invoke the block. This is the main method that an ActionBuilder has to implement, at this stage it can wrap it in any other actions, modify the request object or potentially use a different class to represent the request.
Invoke the block. This is the main method that an ActionBuilder has to implement, at this stage it can wrap it in any other actions, modify the request object or potentially use a different class to represent the request.