OpenFeature.Types (OpenFeature v0.1.3)

View Source

OpenFeature types.

Summary

Types

context()

(since 0.1.0)
@type context() :: %{optional(binary()) => any()}

domain()

(since 0.1.0)
@type domain() :: binary()

error_code()

(since 0.1.0)
@type error_code() ::
  :provider_not_ready
  | :flag_not_found
  | :parse_error
  | :type_mismatch
  | :targeting_key_missing
  | :invalid_context
  | :provider_fatal
  | :general

event_details()

(since 0.1.0)
@type event_details() :: %{
  :provider => binary(),
  optional(:domain) => binary(),
  optional(binary() | atom()) => any()
}

event_handler()

(since 0.1.0)
@type event_handler() :: (event_details() -> any())

event_type()

(since 0.1.0)
@type event_type() :: :ready | :error | :configuration_changed | :stale

flag_metadata()

(since 0.1.0)
@type flag_metadata() :: %{required(binary()) => boolean() | binary() | number()}

flag_type()

(since 0.1.0)
@type flag_type() :: :boolean | :string | :number | :map

flag_value()

(since 0.1.0)
@type flag_value() :: boolean() | binary() | number() | map()

provider_status()

(since 0.1.0)
@type provider_status() :: :not_ready | :ready | :error | :stale | :fatal

reason()

(since 0.1.0)
@type reason() ::
  :static
  | :default
  | :targeting_match
  | :split
  | :cached
  | :disabled
  | :unknown
  | :stale
  | :error