Current section

Files

Jump to
openfeature src openfeature@provider.erl
Raw

src/openfeature@provider.erl

-module(openfeature@provider).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]).
-export_type([feature_provider/0, metadata/0]).
-type feature_provider() :: {feature_provider,
fun((openfeature@evaluation_context:evaluation_context()) -> {ok, nil} |
{error, nil}),
fun(() -> nil),
fun(() -> metadata()),
fun((binary(), boolean(), openfeature@evaluation_context:evaluation_context()) -> openfeature@evaluation:resolution_details(boolean())),
fun((binary(), binary(), openfeature@evaluation_context:evaluation_context()) -> openfeature@evaluation:resolution_details(binary())),
fun((binary(), integer(), openfeature@evaluation_context:evaluation_context()) -> openfeature@evaluation:resolution_details(integer())),
fun((binary(), float(), openfeature@evaluation_context:evaluation_context()) -> openfeature@evaluation:resolution_details(float())),
fun((binary(), gleam@dynamic:dynamic_(), openfeature@evaluation_context:evaluation_context()) -> openfeature@evaluation:resolution_details(gleam@dynamic:dynamic_()))}.
-type metadata() :: {metadata, binary()}.