Current section

Files

Jump to
split_client lib boundary data_source data_source_behaviour.ex
Raw

lib/boundary/data_source/data_source_behaviour.ex

defmodule SplitClient.Boundary.DataSourceBehaviour do
# A Behaviour to establish a common interface for Split.io
# data sources. This will make it possible to change which data source to
# use based on environment. Especially helpful for dev and testing
@moduledoc false
alias SplitClient.Treatment
@callback get_treatment(key :: String.t(), split_name :: String.t(), keyword()) ::
{:ok, Treatment.t()} | {:error, any()}
@callback get_treatments(key :: String.t(), [String.t()], keyword()) ::
{:ok, map()} | {:error, any()}
@callback get_all_treatments([map()], keyword()) ::
{:ok, map()} | {:error, any()}
end