3 #include "ypc/core/singleton.h"
4 #include <ff/util/ntobject.h>
7 define_nt(db_url, std::string);
8 define_nt(db_usr, std::string);
9 define_nt(db_pass, std::string);
10 define_nt(db_dbname, std::string);
11 define_nt(ctrl_net_port, uint16_t);
15 using db_info_t = ::ff::util::ntobject<db_url, db_usr, db_pass, db_dbname>;
16 using net_info_t = ::ff::util::ntobject<ctrl_net_port>;
28 static std::string create_logdir_if_not_exist();
29 static std::string find_db_config_file(
const std::string &filename);
31 static db_info_t read_db_config_file(
const std::string &filename);
32 static net_info_t read_net_info_from_file(
const std::string &conf_file);