Split (split v0.0.0)

Documentation for Split.

Summary

Types

@type t() :: %Split{
  change_number: integer(),
  configurations: map(),
  default_treatment: String.t(),
  flag_sets: [String.t()],
  killed: boolean(),
  name: String.t(),
  traffic_type: String.t(),
  treatments: [String.t()]
}

Functions

Link to this function

get_treatment(user_key, feature_name, bucketing_key \\ nil, attributes \\ %{})

@spec get_treatment(String.t(), String.t(), String.t() | nil, map() | nil) ::
  {:ok, Split.Treatment.t()} | {:error, term()}
Link to this function

get_treatment_with_config(user_key, feature_name, bucketing_key \\ nil, attributes \\ %{})

@spec get_treatment_with_config(String.t(), String.t(), String.t() | nil, map() | nil) ::
  {:ok, Split.Treatment.t()} | {:error, term()}
Link to this function

get_treatments(user_key, feature_names, bucketing_key \\ nil, attributes \\ %{})

@spec get_treatments(String.t(), [String.t()], String.t() | nil, map() | nil) ::
  {:ok, %{required(String.t()) => Split.Treatment.t()}} | {:error, term()}
Link to this function

get_treatments_with_config(user_key, feature_names, bucketing_key \\ nil, attributes \\ %{})

@spec get_treatments_with_config(
  String.t(),
  [String.t()],
  String.t() | nil,
  map() | nil
) ::
  {:ok, %{required(String.t()) => Split.Treatment.t()}} | {:error, term()}
@spec split(String.t()) :: {:ok, t()} | {:error, term()}
@spec split_names() :: {:ok, %{split_names: String.t()}} | {:error, term()}
@spec splits() :: {:ok, [t()]} | {:error, term()}
Link to this function

track(user_key, traffic_type, event_type, value \\ nil, properties \\ %{})

@spec track(String.t(), String.t(), String.t(), term(), map()) ::
  :ok | {:error, term()}