View Source ConfigCat.OverrideDataSource protocol (ConfigCat v4.0.2)
Data source for local overrides of feature flags and settings.
With flag overrides you can overwrite the feature flags & settings downloaded
from the ConfigCat CDN with local values. Moreover, you can specify how the
overrides should apply over the downloaded values. See behaviour/0
.
Summary
Functions
Return the selected flag override behaviour.
Return the local flag overrides from the data source.
Types
@type behaviour() :: :local_only | :local_over_remote | :remote_over_local
Flag override behaviour.
The following 3 behaviours are supported:
Local/Offline mode (
:local_only
): When evaluating values, the SDK will not use feature flags & settings from the ConfigCat CDN, but it will use all feature flags & settings that are loaded from local-override sources.Local over remote (
:local_over_remote
): When evaluating values, the SDK will use all feature flags & settings that are downloaded from the ConfigCat CDN, plus all feature flags & settings that are loaded from local-override sources. If a feature flag or a setting is defined both in the downloaded and the local-override source then the local-override version will take precedence.Remote over local (
:remote_over_local
): When evaluating values, the SDK will use all feature flags & settings that are downloaded from the ConfigCat CDN, plus all feature flags & settings that are loaded from local-override sources. If a feature flag or a setting is defined both in the downloaded and the local-override source then the downloaded version will take precedence.
@type t() :: term()
All the types that implement this protocol.
Functions
Return the selected flag override behaviour.
@spec overrides(data_source :: t()) :: ConfigCat.Config.t()
Return the local flag overrides from the data source.