Module assignment

Source

Structsยง

Assigner
Core assigner with configurable strategies.
AssignerBuilder
Builder for Assigner.
ScaleFactor
A validated, non-negative, finite scale factor.
VnodeChunk ๐Ÿ”’
A lightweight struct to represent a chunk of VNodes during assignment. This is an internal implementation detail.

Enumsยง

BalancedBy
Defines the vnode distribution strategy for hierarchical assignment.
CapacityMode
Defines the capacity assignment strategy for containers.
VnodeChunkingStrategy
Defines the VNode chunking strategy for assignment.

Functionsยง

assign_hierarchical
Hierarchically distributes virtual nodes to actors in two weighted stages with deterministic tie-breaking.
assign_items_weighted_with_scale_fn
Assign items to weighted containers with optional capacity scaling and deterministic tie-breaking.
compute_worker_quotas ๐Ÿ”’
Computes per-worker VNode quotas based on actor counts and worker weights.
stable_hash ๐Ÿ”’
Stable hash utility
unbounded_scale
A no-op capacity scaling function: always returns None.
vec_len_map ๐Ÿ”’
Helper: maps each Vec<V> to its length.
weighted_scale
A unit capacity scaling function: always returns Some(1.0).