FeaturevisorOpenFeature.Provider (featurevisor_openfeature v1.2.0)

Copy Markdown View Source

OpenFeature provider backed by a Featurevisor Elixir SDK instance.

The provider can create and own a Featurevisor instance or borrow an existing instance supplied through new/1. Borrowed instances are never closed by the provider.

Summary

Functions

Initializes the provider for an OpenFeature domain.

Creates a Featurevisor OpenFeature provider.

Resolves a boolean feature flag or variable.

Resolves an object or JSON object variable.

Resolves an integer or floating point variable.

Resolves a string variation or variable.

Releases subscriptions and closes an owned Featurevisor instance.

Types

option()

@type option() ::
  {:featurevisor, Featurevisor.t()}
  | {:featurevisor_options, Featurevisor.options() | keyword()}
  | {:targeting_key_field, String.t()}
  | {:key_separator, String.t()}
  | {:variation_key, String.t()}
  | {:global_variable_prefix, String.t()}

t()

@type t() :: %FeaturevisorOpenFeature.Provider{
  domain: term(),
  featurevisor: term(),
  global_variable_prefix: term(),
  hooks: term(),
  key_separator: term(),
  lifecycle: term(),
  name: term(),
  owns_featurevisor: term(),
  state: term(),
  targeting_key_field: term(),
  variation_key: term()
}

Functions

initialize(provider, domain, context)

Initializes the provider for an OpenFeature domain.

new(options \\ [])

@spec new([option()] | map()) :: t()

Creates a Featurevisor OpenFeature provider.

resolve_boolean_value(provider, key, default, context)

Resolves a boolean feature flag or variable.

resolve_map_value(provider, key, default, context)

Resolves an object or JSON object variable.

resolve_number_value(provider, key, default, context)

Resolves an integer or floating point variable.

resolve_string_value(provider, key, default, context)

Resolves a string variation or variable.

shutdown(provider)

Releases subscriptions and closes an owned Featurevisor instance.