Swim::Table
Open-address table of peers. Lookup and update of a known peer do not allocate. The table allocates only when it grows, or when it compacts tombstones.
Constants
EMPTY = 0_u8
LIVE = 1_u8
TOMB = 2_u8
Constructors
Instance methods
Removes dead peers whose update time is at or before before.
The local peer is kept.
each
Sourcefind(endpoint : Endpoint) : Peer | Nil
Sourcesample(want : Int32, skip_dead : Bool, exclude_a : Endpoint, exclude_b : Endpoint = Endpoint.zero, & : Peer -> ) : Nil
Picks up to want peers. The shuffle uses the order array in place.
skip_dead keeps failed peers out of probes. Gossip leaves it false.
size
Source