Subscription

interface Subscription<T> : Actor

Subscription as the base interface for an SubscriptionClient implementations.

Parameters

T

Type of the receive value from the subscription.

Properties

Link copied to clipboard
abstract val command: SendChannel<SubscriptionCommand<T>>

Send Channel to manipulate the state of the subscription.

Link copied to clipboard

The SubscriptionOptions configured for the subscription.

Link copied to clipboard
abstract val source: SharedFlow<Result<T>>

Shared Flow to receive subscription result.

Link copied to clipboard
abstract val state: StateFlow<SubscriptionState<T>>

State Flow to receive the current state of the subscription.

Functions

Link copied to clipboard
abstract fun launchIn(scope: CoroutineScope): Job

Launches the actor.