reckon_db_store (reckon_db v1.4.4)
View SourceKhepri store lifecycle management for reckon-db
Manages the Khepri store instance, including: - Starting and stopping the store - Cluster formation (in cluster mode) - Health checks
Summary
Functions
Get the current leader node for the store
Get the store name (for use with khepri operations)
Check if the store is ready
Start the store worker IMPORTANT: We use store_worker_name/1 for gen_server registration to avoid conflicting with Khepri's internal naming. Khepri uses the StoreId for its Ra cluster and process registration.
Types
-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 the current leader node for the store
Get the store name (for use with khepri operations)
Check if the store is ready
-spec start_link(store_config()) -> {ok, pid()} | {error, term()}.
Start the store worker IMPORTANT: We use store_worker_name/1 for gen_server registration to avoid conflicting with Khepri's internal naming. Khepri uses the StoreId for its Ra cluster and process registration.