Module ldclient_config

ldclient_config module.

Description

ldclient_config module

Acts as a storage interface for SDK client instance settings.

Data Types

app_info()

app_info() = #{id => binary(), version => binary()}

http_options()

http_options() = #{tls_options => [ssl:tls_client_option()] | undefined, connect_timeout => pos_integer() | undefined, custom_headers => [{Key::string(), Value::string()}] | undefined}

instance()

instance() = #{sdk_key => string(), base_uri => string(), events_uri => string(), stream_uri => string(), feature_store => atom(), events_capacity => pos_integer(), events_flush_interval => pos_integer(), events_dispatcher => atom(), context_keys_capacity => pos_integer(), private_attributes => private_attributes(), stream => boolean(), polling_interval => pos_integer(), polling_update_requestor => atom(), offline => boolean(), redis_host => string(), redis_port => pos_integer(), redis_database => integer(), redis_password => string(), redis_prefix => string(), redis_tls => [ssl:tls_option()] | undefined, cache_ttl => integer(), use_ldd => boolean(), send_events => boolean(), file_datasource => boolean(), file_paths => [string() | binary()], file_auto_update => boolean(), file_poll_interval => pos_integer(), file_allow_duplicate_keys => boolean(), testdata_tag => atom(), datasource => poll | stream | file | testdata | undefined, http_options => http_options(), stream_initial_retry_delay_ms => non_neg_integer(), application => app_info()}

private_attributes()

private_attributes() = all | [ldclient_attribute_reference:attribute_reference()]

Function Index

get_event_schema/0
get_registered_tags/0Get all registered tags.
get_user_agent/0
get_value/2Gets application environment variable value.
get_version/0
init/0Initialize settings environment map.
register/2Register settings for a new client instance.
tls_basic_certifi_options/0Provide basic TLS options using the bundled certifi store.
tls_basic_linux_options/0Provide basic options for using TLS with the default linux store.
tls_basic_options/0Provide basic options for using TLS.
tls_ca_certfile_options/1Provide basic options for using TLS with the given store.
unregister/1Unregister settings for a client instance.
with_tls_revocation/1Append the specified TLS options with certificate revocation.

Function Details

get_event_schema/0

get_event_schema() -> string()

get_registered_tags/0

get_registered_tags() -> [atom()]

Get all registered tags

get_user_agent/0

get_user_agent() -> string()

get_value/2

get_value(Tag::atom(), Key::atom()) -> undefined | term()

Gets application environment variable value

This is a convenience function to retrieve application environment variables in one place. Tag is the instance tag. Key is the key of the configuration option.

get_version/0

get_version() -> string()

init/0

init() -> ok

Initialize settings environment map

Initializes an empty map for instance settings in application environment.

register/2

register(Tag::atom(), Settings::instance()) -> ok

Register settings for a new client instance

tls_basic_certifi_options/0

tls_basic_certifi_options() -> [ssl:tls_client_option()]

Provide basic TLS options using the bundled certifi store.

tls_basic_linux_options/0

tls_basic_linux_options() -> [ssl:tls_client_option()]

Provide basic options for using TLS with the default linux store. This will try to use the a certificate store located at /etc/ssl/certs/ca-certificates.crt.

tls_basic_options/0

tls_basic_options() -> [ssl:tls_client_option()]

Provide basic options for using TLS. This will try to use the a certificate store located at /etc/ssl/certs/ca-certificates.crt, but if that file does not exist, then it will use the bundled certifi store.

tls_ca_certfile_options/1

tls_ca_certfile_options(CaStorePath::string()) -> [ssl:tls_client_option()]

Provide basic options for using TLS with the given store.

unregister/1

unregister(Tag::atom()) -> ok

Unregister settings for a client instance

with_tls_revocation/1

with_tls_revocation(Options::[ssl:tls_client_option()]) -> [ssl:tls_client_option()]

Append the specified TLS options with certificate revocation. The crl_cache does not actually cache at this time, so this will result in an additional request per TLS handshake.


Generated by EDoc