processRequest

fun processRequest(limitId: UUID, key: String): Long?

Logs request attempt from the key with limiter limitId.

Returns Long - the amount of seconds when the next request will be possible - when the key has zero requests left and should be filtered. Otherwise, returns null.

Throws NoSuchElementException if the limitId is not in limitersSettings.

Sources

Link copied to clipboard