FeatureFlippers.feature_flipper

You're seeing just the macro feature_flipper, go back to FeatureFlippers module for more information.
Link to this macro

feature_flipper(feature_flipper_name, options \\ [])

View Source (macro)

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 in YYYY-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 function expired/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 has always_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.