legacy-workflow-rx2 / com.squareup.workflow.legacy.rx2

Package com.squareup.workflow.legacy.rx2

Types

EventChannel

Helper for Reactors that can accept events from external sources.

interface EventChannel<E : Any>

EventSelectBuilder

The receiver for lambdas passed to EventChannel.select. For usage see the documentation for EventChannel.

class EventSelectBuilder<E : Any, R : Any>

Reactor

An Rx2 adapter for com.squareup.workflow.Reactor, allowing implementors to ignore that interface's reliance on kotlin.coroutines.

interface Reactor<S : Any, E : Any, out O : Any> : Launcher<S, E, O>

Extensions for External Classes

com.squareup.workflow.legacy.Workflow

io.reactivex.Single

kotlinx.coroutines.channels.ReceiveChannel

Functions

doLaunch

Use this to implement WorkflowPool.Launcher.launch.

fun <S : Any, E : Any, O : Any> Reactor<S, E, O>.doLaunch(initialState: S, workflows: WorkflowPool, name: String? = null): Workflow<S, E, O>

singleWorker

Creates a Worker that will pass its input value to block, then subscribe to the returned Single and report the value it emits as the worker result.

fun <I : Any, O : Any> singleWorker(block: (I) -> Single<O>): Worker<I, O>

toCoroutineReactor

Adapter to convert a Reactor to a Reactor.

fun <S : Any, E : Any, O : Any> Reactor<S, E, O>.toCoroutineReactor(): Reactor<S, E, O>