Skip to main content

Module evaluator

Module evaluator 

Source
Expand description

The hot path. FlagEvaluator wraps a FlagSet (behind an ArcSwap-style lock) and resolves (flag_id, subject) to a variant.

Bucketing is deterministic: SHA-256(flag_id ‖ "/" ‖ subject_id) mod 100, so the same subject always lands in the same slot — assuming weights don’t shift. That gives us sticky percentage rollouts without an RNG.

Structs§

Evaluation
What an evaluation returns.
FlagEvaluator
Cheap to clone; the inner FlagSet lives behind an Arc<RwLock<_>>.