A feature flag whose treatment is one of a fixed set of named variants.
Variants are listed in declaration order. Without :default the first
variant is the default. Without :rollout the default variant is returned
for every caller. With :rollout, percentages of traffic are allocated to
variants by deterministic bucketing; the total must not exceed 100, every
rollout key must be a declared variant, and each percentage must be in
0..100.
Summary
Types
Functions
Construct a variant flag.
variants is a non-empty list of non-empty, unique strings.
Options:
:default— default variant (must be one ofvariants).:rollout— map ofvariant => percentageallocating traffic.
Like new/2 but raises ArgumentError on invalid input.