Package-level declarations

Types

Link copied to clipboard
class Star(val hub: Seam, val clients: List<GossipSeam>, val source: InMemoryConnectionSource)

A started in-memory star: a hub (GossipSeam FullFanout) and n client GossipSeams. source is the hub's accept handle — admit a fresh client via source.offer(hubEnd).

Functions

Link copied to clipboard
suspend fun CoroutineScope.inMemoryStarOf(n: Int, hubId: PeerId = PeerId("hub"), random: Random = Random(0L)): Star

Build a star of n clients around one hub over connectionPair links, wrap each end in a GossipSeam (hub = FullFanout, clients = default), and GossipSeam.start them on the receiver scope. The hub is composed by hostedOverlay over an InMemoryConnectionSource — one composition path, not two; Star.source is the production- faithful reconnect handle. Client i is PeerId("client-i"). Per-peer seeded RNG.