Fs2StreamOps

implicit class Fs2StreamOps[O](stream: Stream[IO, O]) extends LazyLogging

Extension methods for FS2 streams iterating over IO

Type parameters:
O

Type of the items contained in the stream

Value parameters:
stream

Stream being operated on

Source:
package.scala
trait LazyLogging
class Object
trait Matchable
class Any

Type members

Types

private type O

Value members

Concrete methods

def timedStream(timeout: FiniteDuration): Stream[IO, O]

Configure this stream to fail if not fed for a certain duration

Configure this stream to fail if not fed for a certain duration

Value parameters:
timeout

Time to wait without consuming items before halting the resulting stream

Returns:

A new Stream with the same structure as the input one, but configured to halt and throw an StreamTimeoutException if no items are received within a time window equal to timeout

Source:
package.scala
private def toTimedStream(timeout: FiniteDuration): (IO, O) => O

Stream transformation function, configures this stream to halt and throw StreamTimeoutException if no items are received within a time window

Stream transformation function, configures this stream to halt and throw StreamTimeoutException if no items are received within a time window

Value parameters:
timeout

Time to wait without consuming items before halting the resulting stream

Throws:
StreamTimeoutException

If the time between received items exceeds incomingItemsTimeout

Note:

The timing and cancellations is done via a Timer

Experimental feature, do not use for comparing very tight time thresholds

Source:
package.scala

Concrete fields

private val stream: Stream[IO, O]

Inherited fields

@transient
lazy protected val logger: Logger
Inherited from:
LazyLogging
Source:
Logging.scala