object fs2helpers
- Alphabetic
- By Inheritance
- fs2helpers
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
evalN[F[_], A](fs: Seq[F[A]], n: Int = 10)(implicit F: Effect[F], ec: ExecutionContext): F[Vector[A]]
Given a list of Fs, eval them at most N at a time.
Given a list of Fs, eval them at most N at a time. Output order is not preserved.
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
liftToPipe[A, B](f: (A) ⇒ IO[B]): Pipe[IO, A, B]
Use it with
Stream.through
. -
def
liftToSink[A](f: (A) ⇒ IO[Unit]): Sink[IO, A]
Lift f to Sink.
Lift f to Sink. Use with
Stream.observe
. -
def
log[A](f: (A) ⇒ Unit): Pipe[IO, A, A]
Log something.
Log something. Runs f in a IO.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
parallelWithLimit[A](limit: Int, as: List[IO[A]]): IO[List[A]]
From cats-effect gitter channel.
From cats-effect gitter channel. This does not use fs2 at all actually and does not work from a queue so its incrementally parallel.
-
def
pollWait[A](f: ⇒ IO[A], stop: (A) ⇒ Boolean, poll: FiniteDuration = 10.seconds)(implicit sch: Scheduler, F: Async[IO], ec: ExecutionContext): Stream[IO, A]
Given an effect F, wait until the criteria stop is met.
-
def
shortenDelay(delay: FiniteDuration, fraction: Double = 0.95): FiniteDuration
Calculate a delay but use fraction to shorten the delay.
-
def
sleepFirst[F[_], O](delta: FiniteDuration)(implicit F: Async[F], s: Scheduler, ec: ExecutionContext): Pipe[F, O, O]
A pipe that given a stream, delays it by delta.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
throttle[F[_], A](delay: FiniteDuration = 5.millis)(implicit sch: Scheduler, ec: ExecutionContext, F: Effect[F]): Pipe[F, A, A]
Throttle a stream.
Throttle a stream. Default value is for dynamics throttling.
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
unfoldEvalWithDelay[F[_], A](f: ⇒ F[Option[A]], getDelay: (A) ⇒ FiniteDuration)(implicit M: Functor[F], F: Async[F], t: Timer[F]): Stream[F, A]
Unfold, periodically checking an effect for new values.
Unfold, periodically checking an effect for new values. Time between checks is obtained using getDelay potentially using the returned effect value. f is run immediately when the stream starts. The delay originates from
Timer[F]
(on the F async functor) and not from a fs2 scheduler.- f
Call an effect to get a value.
- getDelay
Extract amount to delay from that value.
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )