Package-level declarations

Types

Link copied to clipboard
class DefaultJoinerReconnectController(roomId: RoomId, reconnectWindowMs: Long = DEFAULT_RECONNECT_WINDOW_MS, clock: () -> Long, scope: CoroutineScope) : JoinerReconnectController

Default implementation of JoinerReconnectController.

Link copied to clipboard
fun interface EndpointSelector

Strategy that picks the next endpoint index from a cluster list on each call.

Link copied to clipboard

Manages per-peer reconnect windows on the leader side.

Link copied to clipboard
sealed interface JoinerReconnectEvent

Events emitted by JoinerReconnectController over its SharedFlow.

Link copied to clipboard
sealed interface ResumeResult

How a resume attempt turned out — on either side of the protocol.

Link copied to clipboard
data class ResumeToken(val peerId: PeerId, val roomId: RoomId, val issuedAt: Long)

Opaque token a joiner presents when reconnecting after a transport drop.

Link copied to clipboard
value class RoomId(val value: String)

Stable handle for a P2P Room session. Survives leader changes: the RoomId is assigned at Room creation and does not rotate if auto-election promotes a new leader.

Link copied to clipboard

Deterministic round-robin EndpointSelector starting at startIndex.

Link copied to clipboard
class ServerClusterReconnect(endpoints: List<Tag>, selector: EndpointSelector = RoundRobinEndpointSelector(startIndex = 0))

Reconnect helper for a joiner that faces a static cluster of server endpoints.