Packages

  • package root
    Definition Classes
    root
  • package fs2
    Definition Classes
    root
  • package compat
    Definition Classes
    fs2
  • package compression
    Definition Classes
    fs2
  • package concurrent

    Provides several concurrency primitives.

    Provides several concurrency primitives. *

    Definition Classes
    fs2
  • package interop
    Definition Classes
    fs2
  • package flow

    Implementation of the reactive-streams protocol for fs2; based on Java Flow.

    Implementation of the reactive-streams protocol for fs2; based on Java Flow.

    Example:
    1. scala> import cats.effect.{IO, Resource}
      scala> import fs2.Stream
      scala> import fs2.interop.flow.syntax._
      scala> import java.util.concurrent.Flow.Publisher
      scala>
      scala> val upstream: Stream[IO, Int] = Stream(1, 2, 3).covary[IO]
      scala> val publisher: Resource[IO, Publisher[Int]] = upstream.toPublisher
      scala> val downstream: Stream[IO, Int] = Stream.resource(publisher).flatMap { publisher =>
           |   publisher.toStream[IO](chunkSize = 16)
           | }
      scala>
      scala> import cats.effect.unsafe.implicits.global
      scala> downstream.compile.toVector.unsafeRunSync()
      res0: Vector[Int] = Vector(1, 2, 3)
    See also

    java.util.concurrent.Flow

  • package timeseries
    Definition Classes
    fs2
p

fs2

interop

package interop

Package Members

  1. package flow

    Implementation of the reactive-streams protocol for fs2; based on Java Flow.

    Implementation of the reactive-streams protocol for fs2; based on Java Flow.

    Example:
    1. scala> import cats.effect.{IO, Resource}
      scala> import fs2.Stream
      scala> import fs2.interop.flow.syntax._
      scala> import java.util.concurrent.Flow.Publisher
      scala>
      scala> val upstream: Stream[IO, Int] = Stream(1, 2, 3).covary[IO]
      scala> val publisher: Resource[IO, Publisher[Int]] = upstream.toPublisher
      scala> val downstream: Stream[IO, Int] = Stream.resource(publisher).flatMap { publisher =>
           |   publisher.toStream[IO](chunkSize = 16)
           | }
      scala>
      scala> import cats.effect.unsafe.implicits.global
      scala> downstream.compile.toVector.unsafeRunSync()
      res0: Vector[Int] = Vector(1, 2, 3)
    See also

    java.util.concurrent.Flow

Ungrouped