Packages

ConfigCat SDK for Elixir. Feature Flags created by developers for developers with ❤️. ConfigCat lets you manage feature flags across frontend, backend, mobile, and desktop apps without (re)deploying code. % rollouts, user targeting, segmentation. Feature toggle SDKs for all main languages.

Current section

Files

Jump to
configcat lib config_cat null_data_source.ex
Raw

lib/config_cat/null_data_source.ex

defmodule ConfigCat.NullDataSource do
@moduledoc """
Don't provide any local flag overrides.
Used to avoid `is_nil` checks in the rest of the code.
See `ConfigCat.OverrideDataSource` for more details.
"""
alias ConfigCat.OverrideDataSource
defstruct []
@type t :: %__MODULE__{}
@doc """
Create a `ConfigCat.OverrideDataSource` that does nothing.
"""
@spec new :: t
def new do
%__MODULE__{}
end
defimpl OverrideDataSource do
def behaviour(_data_source), do: :local_over_remote
def overrides(_data_source), do: {:ok, %{}}
end
end