Skip to content

pickRendezvous

pickRendezvous<T>(key, candidates, identityOf): T

Defined in: src/cluster/router/ConsistentHashing.ts:27

Pick the candidate with the highest combined-hash for key. candidates is iterated in order; ties are broken by first-occurrence to keep behaviour deterministic given identical inputs.

Throws if candidates is empty — callers should check beforehand.

T

string

readonly T[]

(c) => string

T