unleash-client-haskell-core-0.10.0: Unleash feature toggle client core
CopyrightCopyright © FINN.no AS Inc. All rights reserved.
LicenseMIT
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageHaskell2010

Unleash.Internal.DomainTypes

Description

Domain types and evaluation functions.

Synopsis

Documentation

featureGetVariant Source #

Arguments

:: 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.

featureIsEnabled Source #

Arguments

:: 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.

data Feature Source #

Feature toggle.

Constructors

Feature 

Fields

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.

Constructors

GetVariant (forall m. MonadIO m => Context -> m VariantResponse) 

newtype IsEnabled Source #

Feature toggle state getter.

Constructors

IsEnabled (forall m. MonadIO m => Context -> m Bool)