| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Control.Flipper
Description
- enabled :: HasFeatureFlags m => FeatureName -> m Bool
- enabledFor :: (HasFeatureFlags m, HasActorId a) => FeatureName -> a -> m Bool
- enable :: ModifiesFeatureFlags m => FeatureName -> m ()
- enableFor :: (ModifiesFeatureFlags m, HasActorId a) => FeatureName -> a -> m ()
- enableForPercentage :: ModifiesFeatureFlags m => FeatureName -> Percentage -> m ()
- disable :: ModifiesFeatureFlags m => FeatureName -> m ()
- toggle :: ModifiesFeatureFlags m => FeatureName -> m ()
- whenEnabled :: HasFeatureFlags m => FeatureName -> m () -> m ()
- whenEnabledFor :: (HasFeatureFlags m, HasActorId a) => FeatureName -> a -> m () -> m ()
- module Control.Flipper.Types
Documentation
enabled :: HasFeatureFlags m => FeatureName -> m Bool Source #
enabledFor :: (HasFeatureFlags m, HasActorId a) => FeatureName -> a -> m Bool Source #
The enabledFor function returns a Bool indicating if the queried feature is
active for the given enitty.
If the queried FeatureName does not exists, enabledFor returns False.
enable :: ModifiesFeatureFlags m => FeatureName -> m () Source #
The enable function activates a feature globally.
When the FeatureName does not exist, it is created and set to active.
enableFor :: (ModifiesFeatureFlags m, HasActorId a) => FeatureName -> a -> m () Source #
The enableFor function activates a feature for a single actor.
If the FeatureName does not exist in the store, it is created and set to active only for the given actor.
enableForPercentage :: ModifiesFeatureFlags m => FeatureName -> Percentage -> m () Source #
The enableForPercentage function activates a feature for a percentage of actors.
If the FeatureName does not exist in the store, it is created and set to active only for the specified percentage.
disable :: ModifiesFeatureFlags m => FeatureName -> m () Source #
The disable function deactivates a feature globally.
When the FeatureName does not exist, it is created and set to inactive.
toggle :: ModifiesFeatureFlags m => FeatureName -> m () Source #
The toggle function flips the current state of a feature globally.
When the FeatureName does not exist, it is created and set to True.
whenEnabled :: HasFeatureFlags m => FeatureName -> m () -> m () Source #
The whenEnabled function calls the supplied function, 'm ()', when the given
FeatureName is enabled.
When the feature specified by FeatureName is disabled, 'm ()' is not
evaluated.
whenEnabledFor :: (HasFeatureFlags m, HasActorId a) => FeatureName -> a -> m () -> m () Source #
The whenEnabledFor function calls the supplied function, 'm ()', when the given
FeatureName is enabled for the given actor.
When the feature specified by FeatureName is disabled for the given actor,
'm ()' is not evaluated.
module Control.Flipper.Types