reckon_db_config (reckon_db v1.6.0)

View Source

Configuration 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

store_config/0

-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()}.

Functions

get_all_store_configs()

-spec get_all_store_configs() -> [store_config()].

Get all configured store configurations

get_env(Key, Default)

-spec get_env(atom(), term()) -> term().

Get an application environment value

get_env(App, Key, Default)

-spec get_env(atom(), atom(), term()) -> term().

Get an application environment value with a specific app

get_store_config(StoreId)

-spec get_store_config(atom()) -> {ok, store_config()} | {error, not_found}.

Get configuration for a specific store