FeatureFlippers.feature_flipper
feature_flipper
, go back to FeatureFlippers module for more information.
Defines a feature flipper.
The feature_flipper_name
must end with ?
.
Examples
feature_flipper :foo?
feature_flipper :bar?, expires: "2000-01-01"
feature_flipper :baz?, always_disabled: true
Options
feature_flipper/2
accepts the following options:
:expires
- a string inYYYY-MM-DD
format representing the date when it should expire.FeatureFlippers
does not alter any feature flipper flag in execution when they expire; this works as informational indication to developers when the respective flag should be decommissioned. The functionexpired/0
will also show the expired flag names.:always_disabled
- a boolean indicating if the feature flipper should be forcefully disabled. This is defined in compile time, so if a feature flipper hasalways_disabled: true
, it means that no application configuration will be read; the developer should reenable it and recompile the code if they need to turn it on again. It can be used when new features are not prepared for production yet, therefore they should never have the capability to be turned on.