CommonLimiter

@Serializable
class CommonLimiter(lockCount: Int = 10, regenTime: MilliSeconds = 15 * 1000, scope: CoroutineScope = CoroutineScope(Dispatchers.Default)) : RequestLimiter

Constructors

Link copied to clipboard
fun CommonLimiter(lockCount: Int = 10, regenTime: MilliSeconds = 15 * 1000, scope: CoroutineScope = CoroutineScope(Dispatchers.Default))

Functions

Link copied to clipboard
open suspend override fun <T> limit(block: suspend () -> T): T

Use limit for working of block (like delay between or after, for example)

open suspend fun <T : Any> limit(request: Request<T>, block: suspend () -> T): T