Pollable

libretto.scaletto.ScalettoStreams.Pollable$
opaque object Pollable

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Type members

Classlikes

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Types

opaque type BroadcastByKey[K, V]

Value members

Concrete methods

def broadcastByKey[A, K : Ordering, V](f: Val[A] -⚬ Val[K] |*| Val[V]): Pollable[A] -⚬ BroadcastByKey[K, V]
def close[A]: Pollable[A] -⚬ Done
def cons[A]: Val[A] |*| Pollable[A] -⚬ Pollable[A]
def delay[A](d: FiniteDuration): Pollable[A] -⚬ Pollable[A]
def drain[A]: Pollable[A] -⚬ Done

Polls and discards all elements.

Polls and discards all elements.

Attributes

def empty[A]: Done -⚬ Pollable[A]
def from[Z, A](onClose: Z -⚬ Done, onPoll: Z -⚬ Done |+| Val[A] |*| Pollable[A]): Z -⚬ LPollable[Val[A]]
def fromList[A]: Val[List[A]] -⚬ Pollable[A]
def fromList[A](as: List[A]): Done -⚬ Pollable[A]
def map[A, B](f: A => B): Pollable[A] -⚬ Pollable[B]

Merges two Pollables into one. Left-biased: when there is a value available from both upstreams, favors the first one.

Merges two Pollables into one. Left-biased: when there is a value available from both upstreams, favors the first one.

Attributes

Merges a list of Pollables into a single Pollable. Head-biased: when there is an element available from multiple upstreams, favors the upstream closest to the head of the input list.

Merges a list of Pollables into a single Pollable. Head-biased: when there is an element available from multiple upstreams, favors the upstream closest to the head of the input list.

Attributes

def of[A](as: A*): Done -⚬ Pollable[A]
def partition[A, B]: Pollable[Either[A, B]] -⚬ Pollable[A] |*| Pollable[B]

Splits a stream of "A or B" to a stream of A and a stream of B.

Splits a stream of "A or B" to a stream of A and a stream of B.

Polls the upstream only after ''both'' downstreams poll. When either of the downstreams closes, the other downstream and the upstream are closed as well.

Attributes

def poll[A]: Pollable[A] -⚬ Polled[A]
def prepend[A]: Val[A] |*| Pollable[A] -⚬ Pollable[A]
def statefulMap[S, A, B](f: ((S, A)) => (S, B))(initialState: S): Pollable[A] -⚬ Pollable[B]
def toList[A]: Pollable[A] -⚬ Val[List[A]]

Implicits

Implicits

implicit def negativePollable[A]: Negative[Pollable[A]]