Package-level declarations

Types

Link copied to clipboard

An OrbitContainer where the internal state and external state are the same type.

Link copied to clipboard

An OrbitContainerDecorator where the internal state and external state are the same type.

Link copied to clipboard

An OrbitContainerHost where the internal state and external state are the same type.

Link copied to clipboard
object Orbit

Global Orbit configuration.

Link copied to clipboard

The heart of the Orbit MVI system. Represents an MVI container with its input and outputs. You can manipulate the container through the orbit function

Link copied to clipboard
Link copied to clipboard

Apply this interface to anything you want to become an orbit container host. Typically this will be an Android ViewModel but it can be applied to simple presenters etc.

Link copied to clipboard
data class RealSettings(val sideEffectBufferSize: Int = Channel.BUFFERED, val idlingRegistry: IdlingResource = NoopIdlingResource(), val eventLoopDispatcher: () -> CoroutineDispatcher = { Dispatchers.Default }, val intentLaunchingDispatcher: () -> CoroutineDispatcher = { Dispatchers.Unconfined }, val exceptionHandler: CoroutineExceptionHandler? = null, val repeatOnSubscribedStopTimeout: Long = 100, val sideEffectMode: SideEffectMode = SideEffectMode.FAN_OUT, val sideEffectReplayClearDelayMs: Long = 100)
Link copied to clipboard
Link copied to clipboard

Controls how side effects are delivered to collectors.

Functions

Link copied to clipboard

Build and execute an intent on OrbitContainer in a blocking manner, without dispatching.

Link copied to clipboard
fun <STATE : Any, SIDE_EFFECT : Any> CoroutineScope.container(initialState: STATE, buildSettings: SettingsBuilder.() -> Unit = {}, onCreate: suspend Syntax<STATE, SIDE_EFFECT>.() -> Unit? = null): OrbitContainer<STATE, STATE, SIDE_EFFECT>

Helps create a concrete container in a standard way.

fun <INTERNAL_STATE : Any, EXTERNAL_STATE : Any, SIDE_EFFECT : Any> CoroutineScope.container(initialState: INTERNAL_STATE, transformState: (INTERNAL_STATE) -> EXTERNAL_STATE, buildSettings: SettingsBuilder.() -> Unit = {}, onCreate: suspend Syntax<INTERNAL_STATE, SIDE_EFFECT>.() -> Unit? = null): OrbitContainer<INTERNAL_STATE, EXTERNAL_STATE, SIDE_EFFECT>

Helps create a concrete container with external state transformation in a standard way.

Link copied to clipboard
fun <STATE : Any, SIDE_EFFECT : Any> CoroutineScope.orbitContainer(initialState: STATE, buildSettings: SettingsBuilder.() -> Unit = {}, onCreate: suspend Syntax<STATE, SIDE_EFFECT>.() -> Unit? = null): OrbitContainer<STATE, STATE, SIDE_EFFECT>

Helps create a concrete container in a standard way.

fun <INTERNAL_STATE : Any, EXTERNAL_STATE : Any, SIDE_EFFECT : Any> CoroutineScope.orbitContainer(initialState: INTERNAL_STATE, transformState: (INTERNAL_STATE) -> EXTERNAL_STATE, buildSettings: SettingsBuilder.() -> Unit = {}, onCreate: suspend Syntax<INTERNAL_STATE, SIDE_EFFECT>.() -> Unit? = null): OrbitContainer<INTERNAL_STATE, EXTERNAL_STATE, SIDE_EFFECT>

Helps create a concrete container with external state transformation in a standard way.