reckon_db_config (reckon_db v2.1.4)
View SourceConfiguration management for reckon-db
Handles reading and validating store configurations from the application environment.
Summary
Functions
Get all configured store configurations
Get an application environment value
Get an application environment value with a specific app
Get configuration for a specific store
Types
-type integrity_config() :: disabled | #{enabled := true, key_source := integrity_key_source()}.
-type integrity_key_source() :: {env_var, EnvName :: binary()} | {sealed_file, Path :: file:filename()}.
-type store_config() :: #store_config{store_id :: atom(), data_dir :: string(), mode :: single | cluster, timeout :: pos_integer(), writer_pool_size :: pos_integer(), reader_pool_size :: pos_integer(), gateway_pool_size :: pos_integer(), options :: map(), integrity :: integrity_config()}.
Functions
-spec get_all_store_configs() -> [store_config()].
Get all configured store configurations
Get an application environment value
Get an application environment value with a specific app
-spec get_store_config(atom()) -> {ok, store_config()} | {error, not_found}.
Get configuration for a specific store