New features
- Update RateLimiter api (#73): now you can use
acquireS
methods to get not only boolean flag, but also a limiter state:
/**
* @param limit - max available tokens
* @param remaining - remaining tokens
* @param isAllowed - is current request allowed
* @param reset - epoch seconds at which rate limit resets
* @param resetAfter - total time (in seconds) of when the current rate limit bucket will reset
* @param key - bucket
*/
final case class State(
limit: Long,
remaining: Long, // (not including the current acquired token)
isAllowed: Boolean,
reset: Long,
resetAfter: Long,
key: String
)
Dependencies update