GossipView

constructor(selfId: PeerId, seam: Seam, roster: StateFlow<Set<PeerId>>, rawIncoming: SharedFlow<Swatch>, random: Random, clock: () -> Instant, config: HeartbeatConfig = HeartbeatConfig(), spareCount: Int = DEFAULT_SPARE_COUNT, jitter: ClosedRange<Duration> = DEFAULT_JITTER, topology: TopologyPolicy = RandomKRegular(random))

Parameters

selfId

this peer's id; never selected into the view.

seam

the base multi-peer seam; per-peer detectors send ping/pong through it.

roster

the live full-membership set (includes selfId); the view's source of truth.

rawIncoming

a fan-out of the base seam's inbound frames. The owner (e.g. GossipSeam) is the single collector of seam.incoming and re-publishes each Swatch here, so the per-peer detectors can subscribe without contending for the single-consumer seam.incoming channel (ADR-034).

random

a seeded RNG, seeded per-peer by the caller so peers choose independently. Drives the recompute jitter; with the default topology the same instance also seeds neighbour selection.

clock

injected time source for the per-peer detectors; never the wall clock.

topology

the overlay shape — which peers fill the active view. Owns all selection randomness; defaults to a RandomKRegular seeded from random.