Skip to content

Package-level declarations

//fluxbase-kotlin/io.github.nimbleflux.fluxbase.realtime

Name Summary
BroadcastCallback [jvm]
typealias BroadcastCallback = (JsonElement) -> Unit
Callback type for broadcast events.
ChangeEventCallback [jvm]
typealias ChangeEventCallback = (PostgresChangesPayload) -> Unit
Callback type for postgres_changes events.
ChangeEventType [jvm]
enum class ChangeEventType : Enum<ChangeEventType>
The type of a postgres_changes event. Port of the TS eventType values.
KtorWebSocketTransport [jvm]
class KtorWebSocketTransport(trustAllCertificates: Boolean = false) : WebSocketTransport
Ktor-backed WebSocketTransport — the production WebSocket implementation for JVM/Android.
PostgresChangesConfig [jvm]
data class PostgresChangesConfig(val event: String = "*", val schema: String = "public", val table: String? = null, val filter: String? = null)
Subscription config for a postgres_changes channel. Port of PostgresChangesConfig from sdk/src/types.ts:397.
PostgresChangesPayload [jvm]
@Serializable
data class PostgresChangesPayload(val eventType: String, val schema: String? = null, val table: String? = null, val commitTimestamp: String? = null, val newRecord: JsonElement? = null, val oldRecord: JsonElement? = null, val errors: String? = null)
A normalized postgres_changes payload — the Supabase-compatible shape the TS SDK produces by converting the server’s new_record/old_record to new/old. Port of RealtimePostgresChangesPayload from sdk/src/types.ts:408.
RealtimeChannel [jvm]
class RealtimeChannel(baseUrl: String, channelName: String, token: String?, transport: WebSocketTransport, coroutineDispatcher: CoroutineContext = Dispatchers.IO)
A realtime channel — one WebSocket connection to /realtime?token=<jwt> that subscribes to postgres_changes, broadcast, and/or presence events.
WebSocketTransport [jvm]
interface WebSocketTransport
SPI for WebSocket I/O — the seam where tests inject a fake transport (see FakeWebSocketTransport) instead of a real WS connection.