tofu.streams.Pace.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tofu-streams_2.13 Show documentation
Show all versions of tofu-streams_2.13 Show documentation
Opinionated set of tools for functional programming in Scala
The newest version!
package tofu.streams
import scala.concurrent.duration.FiniteDuration
trait Pace[F[_]] {
/** Throttles `F` to the specified `rate`.
*/
def throttled[A](fa: F[A])(rate: FiniteDuration): F[A]
/** Delay pull from `F` for `d` duration.
*/
def delay[A](fa: F[A])(d: FiniteDuration): F[A]
}
object Pace {
def apply[F[_]](implicit ev: Pace[F]): Pace[F] = ev
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy