Unleash v1.8.3 Unleash.Strategy.GradualRolloutUserId View Source
Requires :user_id in Unleash.context/0
Based on the
gradualRolloutUserId
strategy.
Link to this section Summary
Functions
You can implmenet this callback a couple of ways, returning a bare boolean()
or a {boolean, map()}. The latter is preferred, as it generates a
:debug level log entry detailing the name of the strategy, the result, and
the contents of map(), in an effort to help understand why the result was
what it was.
Link to this section Functions
You can implmenet this callback a couple of ways, returning a bare boolean()
or a {boolean, map()}. The latter is preferred, as it generates a
:debug level log entry detailing the name of the strategy, the result, and
the contents of map(), in an effort to help understand why the result was
what it was.
Arguments
parameters- A map of paramters returned from the Unleash server. This can be whatever you like, such as a configured list ofuserIds.context- The context passed intoUnleash.enabled?/3.
Examples
@behaviour Unleash.Strategy
def enabled?(params, context), do: {false, params}
def enabled(params, %{}), do: false
Callback implementation for Unleash.Strategy.enabled?/2.