NodeObserver

interface NodeObserver(source)

Subscriber-and-dispatcher contract for the per-node state-flow streams.

Functions

Link copied to clipboard
abstract fun close()

Tears down all observation and releases any held coroutines.

Link copied to clipboard
abstract fun observe(node: MutableStateFlow<Node>)

Begins observing the given node's state flow. Implementations must dispatch each new value to the appropriate processor and tolerate the same id being observed twice (idempotent).

Link copied to clipboard
abstract fun remove(id: String)

Stops observing the node with the given id. No-op if not observing.