ngl_server 1.0
基于 Actor 模型的 C++ 服务器框架
start_node.h File Reference

节点启动辅助函数声明。 More...

#include "actor/actor_logic/actor_client/actor_client.h"
#include "tools/db/sql/postgresql/npostgresql_manage.h"
#include "tools/db/sql/mysql/nmysql_manage.h"
#include "actor/protocol/nprotocol.h"
#include "tools/log/nlog.h"
#include <string_view>
#include <cstdint>
#include <string>
#include <vector>
#include <chrono>
#include <thread>

Classes

struct  node_boot_opt

Enumerations

enum class  startup_error : int {
  ok = 0 , invalid_args = 2 , invalid_node_type = 3 , config_not_found = 4 ,
  config_load_failed = 5 , tab_server_missing = 6 , net_config_missing = 7 , node_start_failed = 9
}

Functions

startup_error init_server (int aid, const std::set< pbnet::ENUM_KCP > &akcp={}, int *atcp_port=nullptr)
void make_log_actor ()
node_boot_opt make_node_opt (std::initializer_list< pbnet::ENUM_KCP > akcp_types={}, bool ause_actor=true, bool amake_log=true, bool areg_actor=true)
template<typename tsetup>
startup_error start_node (const char *anode_name, int *atcp_port, const node_boot_opt &aopts, tsetup &&asetup)
template<typename tdb_cfg>
bool init_db (const tdb_cfg &adb_cfg)

Detailed Description

节点启动辅助函数声明。