ReturnPolicy

Controls when gameHost returns the leader RaftNode to the caller.

  • FullMembership (the default) suspends until all peerCount voters have joined; the leader is returned only once the roster is complete. This is the original bootstrap behaviour.

  • Quorum returns as soon as a majority of peerCount voters are present (peerCount / 2 + 1), so the game can start without blocking on the slowest or absent peer. gameHost then keeps admitting the remaining ("latecomer") voters in the background on the caller's scope for the life of the session — the admission door stays open until the roster reaches peerCount, so a latecomer joins and is promoted whenever it connects, however late. Its gameJoin only ever suspends in the normal learner-waiting-for-promotion sense, which always resolves; there is no window after which a join is silently dead. (A peer connecting once the roster is already full is the separate, deferred concern in #587.)

This is an explicit functional mode — which path runs decides whether the host blocks on full membership — so it is a named enum rather than a boolean flag (per the optional≠tuning convention).

Entries

Link copied to clipboard
Link copied to clipboard

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
expect val name: String
Link copied to clipboard
expect val ordinal: Int

Functions

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.