Crate kitsune_p2p_dht_arc

Source

Structs§

ArcRange
This represents the range of values covered by an arc
DhtArc
The main DHT arc type. Represents an Agent’s storage Arc on the DHT, preserving the agent’s DhtLocation even in the case of a Full or Empty arc. Contrast to DhtArcRange, which is used for cases where the arc is not associated with any particular Agent, and so the agent’s Location cannot be known.
DhtLocation
Type for representing a location that can wrap around a u32 dht arc

Enums§

DhtArcRange
A variant of DHT arc which is intentionally forgetful of the Agent’s location. This type is used in places where set logic (union and intersection) is performed on arcs, which splits and joins arcs in such a way that it doesn’t make sense to claim that the arc belongs to any particular agent or location.
DhtArcSet

Constants§

DEFAULT_MIN_PEERS
The minimum number of peers before sharding can begin. This factors in the expected uptime to reach the redundancy target.
DEFAULT_MIN_REDUNDANCY
The minimum number of peers we can consider acceptable to see in our arc during testing.
FULL_LEN
FULL_LEN_F
MAX_HALF_LENGTH
The maximum you can hold either side of the hash location is half the circle. This is half of the furthest index you can hold 1 is added for rounding 1 more is added to represent the middle point of an odd length array

Functions§

check_redundancy
Check a set of peers the actual redundancy across all peers. This can tell if there is bad distribution. Note this function is only used for verification in tests at this time.
full_to_half_len
half_to_full_len
is_full
Check whether a bounded interval is equivalent to the Full interval