throughRateLimiter

fun <T> Flow<T>.throughRateLimiter(rateLimiter: RateLimiter, permits: Int = 1): Flow<T>(source)

Protects collection of this Flow with a RateLimiter: acquiring permits tokens gates when collection of the upstream flow is allowed to start.