fs2.interop.reactivestreams

Type members

Classlikes

final implicit
class PublisherOps[A](val publisher: Publisher[A]) extends AnyVal
final implicit
class StreamOps[F[_], A](val stream: Stream[F, A])
final
class StreamSubscriber[F[_], A](val sub: FSM[F, A])(implicit F: ApplicativeError[F, Throwable]) extends Subscriber[A]

Implementation of a org.reactivestreams.Subscriber.

Implementation of a org.reactivestreams.Subscriber.

This is used to obtain a fs2.Stream from an upstream reactivestreams system.

See also
Companion
object
Companion
class
final
class StreamUnicastPublisher[F[_], A](val stream: Stream[F, A], dispatcher: Dispatcher[F])(implicit evidence$1: Async[F]) extends Publisher[A]

Implementation of a org.reactivestreams.Publisher

Implementation of a org.reactivestreams.Publisher

This is used to publish elements from a fs2.Stream to a downstream reactivestreams system.

See also
Companion
object

Value members

Concrete methods

def fromPublisher[F[_] : Async, A](p: Publisher[A], bufferSize: Int): Stream[F, A]

Creates a lazy stream from an org.reactivestreams.Publisher.

Creates a lazy stream from an org.reactivestreams.Publisher.

The publisher only receives a subscriber when the stream is run.

Value Params
bufferSize

setup the number of elements asked each time from the org.reactivestreams.Publisher. A high number can be useful is the publisher is triggering from IO, like requesting elements from a database. The publisher can use this bufferSize to query elements in batch. A high number will also lead to more elements in memory.

Deprecated methods

@deprecated("Use fromPublisher method with a buffer size. Use a buffer size of 1 to keep the same behavior.", "3.1.4")
def fromPublisher[F[_] : Async, A](p: Publisher[A]): Stream[F, A]

Creates a lazy stream from an org.reactivestreams.Publisher.

Creates a lazy stream from an org.reactivestreams.Publisher.

The publisher only receives a subscriber when the stream is run.

Deprecated

Implicits

Implicits

final implicit
def PublisherOps[A](publisher: Publisher[A]): PublisherOps[A]
final implicit
def StreamOps[F[_], A](stream: Stream[F, A]): StreamOps[F, A]