Copyright | Copyright © FINN.no AS Inc. All rights reserved. |
---|---|
License | MIT |
Stability | experimental |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Domain types and evaluation functions.
Synopsis
- featureGetVariant :: MonadIO m => Features -> FeatureToggleName -> Context -> m VariantResponse
- featureIsEnabled :: MonadIO m => Features -> FeatureToggleName -> Context -> m Bool
- fromJsonFeatures :: Features -> Features
- supportedStrategies :: [Text]
- data Feature = Feature {}
- type Features = Map FeatureToggleName Feature
- type FeatureToggleName = Text
- newtype GetVariant = GetVariant (forall m. MonadIO m => Context -> m VariantResponse)
- newtype IsEnabled = IsEnabled (forall m. MonadIO m => Context -> m Bool)
Documentation
:: MonadIO m | |
=> Features | Full set of features fetched from a server. |
-> FeatureToggleName | Feature toggle name (as it is represented on the server). |
-> Context | User context. |
-> m VariantResponse | Variant. |
Get a variant for a given feature toggle.
:: MonadIO m | |
=> Features | Full set of features fetched from a server. |
-> FeatureToggleName | Feature toggle name (as it is represented on the server). |
-> Context | User context. |
-> m Bool | Feature toggle state. |
Check whether or not a feature toggle is enabled.
fromJsonFeatures :: Features -> Features Source #
Feature toggle set domain transfer object to domain type converter.
supportedStrategies :: [Text] Source #
A list of currently supported strategies for this library.
Feature toggle.
Feature | |
|
type Features = Map FeatureToggleName Feature Source #
Map of feature toggles keyed on toggle names. Typically the full set of features fetched from a server.
type FeatureToggleName = Text Source #
Alias used for feature toggle names (as they are represented on Unleash servers).
newtype GetVariant Source #
Feature toggle variant getter.
GetVariant (forall m. MonadIO m => Context -> m VariantResponse) |