SharedStorage/utils/config/GlobalConfig.h

30 lines
604 B
C++

//
// Created by Kirill Zhukov on 21.04.2025.
//
#ifndef GLOBAL_CONFIG_H
#define GLOBAL_CONFIG_H
#include <cstddef>
#include <string>
#include <unordered_map>
#include "utils/toml/toml.hpp"
namespace usub::utils
{
struct DatabaseSettings
{
size_t shm_queue_capacity = 1024;
size_t max_memtable_size = 1024 * 1024;
size_t l0_queue_capacity = 1024;
size_t estimated_element_size = 128;
};
extern std::unordered_map<std::string, DatabaseSettings> database_settings_map;
void load_global_config(toml::parse_result& path);
}
#endif //GLOBAL_CONFIG_H