EventSourceDslModifiers

kreuzberg.EventSourceDslModifiers

Methods which chain event sources.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait EventSourceDsl[E]
trait EventSource[E]
class AndSource[E]
object Assembled.type
class ChannelSource[E]
class CollectEvent[E, F]
class EffectEvent[E, R]
class Js[E]
class MapSource[E, F]
class OrSource[E]
class TapSource[E]
class Timer
class WithState[E, S]
Show all
Self type

Members list

Value members

Concrete methods

def collect[F](f: PartialFunction[E, F]): EventSource[F]
inline def effect[T >: E, R](op: T => Effect[R]): EventSource[(T, Try[R])]

Add some effect.

Add some effect.

Attributes

def filter(f: E => Boolean): EventSource[E]
inline def future[T >: E, R](op: T => Future[R]): EventSource[(T, Try[R])]

Add some future.

Add some future.

Attributes

def handleErrors[F](sink: EventSink[Throwable])(implicit ev: E => Try[F]): EventSource[F]

If e is a Try[T], handle errors using another sink.

If e is a Try[T], handle errors using another sink.

Attributes

def map[F](f: E => F): EventSource[F]
inline def mapUnit: EventSource[Unit]

Throw away any data.

Throw away any data.

Attributes

def recoverWith[T, R](f: Throwable => T)(implicit ev: E => Try[T]): EventSource[T]

Recover a Try-Event source into something useful.

Recover a Try-Event source into something useful.

Attributes

def recoverWith2[A, T, R](f: Throwable => T)(implicit ev: E => (A, Try[T])): EventSource[(A, T)]

Recovers the most right part of a pair.

Recovers the most right part of a pair.

Attributes

inline def second[T >: E, A, B](using ev: T => (A, B)): EventSource[B]

Take the second value of a Pair.

Take the second value of a Pair.

Attributes

inline def state[S](from: RuntimeState[S]): EventSource[(E, S)]

Add some runtime state.

Add some runtime state.

Attributes

def transform[F, R](f: EventSource[E] => R): R

Transform via function.

Transform via function.

Attributes

inline def withEffect[T >: E, R](op: T => Effect[R]): EventSource[Try[R]]

Replace with effect data.

Replace with effect data.

Attributes

inline def withFuture[T >: E, R](op: T => Future[R]): EventSource[Try[R]]

Replace with future result.

Replace with future result.

Attributes

inline def withState[S](from: RuntimeState[S]): EventSource[S]

Replace with runtime state.

Replace with runtime state.

Attributes