Package-level declarations

Types

Link copied to clipboard
sealed interface ContainerChange

A single change to the membership of a container subscription.

Link copied to clipboard
Link copied to clipboard
class ErrorEvent(val type: SubscriptionErrorType, val reason: ErrorReason) : Event<Nothing>

An Event reporting a subscription error, terminating the stream.

Link copied to clipboard
sealed interface Event<out T>

An event emitted from a subscription or channel Flow.

Link copied to clipboard

An Event stream carrying record field maps, as produced by StreamLinkConnection.getSubject.

Link copied to clipboard
class StatusEvent(val type: SubscriptionStatusType, val message: String, val fields: Map<String, String>) : Event<Nothing>

An Event reporting a subscription status change.

Link copied to clipboard
interface StreamLinkConnection : StreamLink, AutoCloseable

A coroutine- and Flow-friendly wrapper around a Caplin StreamLink connection.

Link copied to clipboard

Creates authenticated StreamLinkConnections to a Liberator.

Link copied to clipboard
class UpdateEvent<out T>(val payload: T) : Event<T>

An Event carrying a data payload — a record update, container change or deserialised value.

Functions

Link copied to clipboard
suspend fun <T> Flow<Event<T>>.awaitStatusOk(): StatusEvent

Suspends until the stream emits a StatusEvent with type STATUS_OK, returning it.

Link copied to clipboard

Keeps only UpdateEvents from the stream, unwrapping each to its payload.

Link copied to clipboard
fun Flow<ContainerChange>.runningFold(): Flow<PersistentList<String>>

Folds a stream of ContainerChanges into successive snapshots of the container's row subjects, emitting the updated list after each change.