reckon_db_sup (reckon_db v1.2.6)

View Source

Top-level supervisor for reckon-db

This supervisor manages all store instances configured in the application environment. Each store gets its own system supervisor subtree.

Summary

Functions

Start the top-level supervisor

Start a store dynamically

Stop a store dynamically

Get list of running stores

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

start_link()

-spec start_link() -> {ok, pid()} | {error, term()}.

Start the top-level supervisor

start_store(StoreId)

-spec start_store(atom() | store_config()) -> {ok, pid()} | {error, term()}.

Start a store dynamically

stop_store(StoreId)

-spec stop_store(atom()) -> ok | {error, term()}.

Stop a store dynamically

which_stores()

-spec which_stores() -> [atom()].

Get list of running stores