ExLaunchDark.LDAdapter (ex_launch_dark v1.1.2)

View Source

Adapter module for LaunchDarkly feature flag evaluations.

Summary

Functions

Retrieves the state of all feature flags for a given context.

Retrieves the value of a single feature flag for a given context.

Tracks a custom event for a given context.

Functions

get_all_flags(project_id, ld_context)

Retrieves the state of all feature flags for a given context.

get_feature_flag_value(project_id, flag_key, ld_context, default_value)

@spec get_feature_flag_value(
  atom(),
  String.t(),
  ExLaunchDark.LDContextStruct.t(),
  any()
) ::
  {:ok, any(), atom()} | {:error, any(), atom()} | {:null, any(), atom()}

Retrieves the value of a single feature flag for a given context.

track_event(project_id, event_name, ld_context, event_data \\ %{})

Tracks a custom event for a given context.