Branch data Line data Source code
1 : : // X-macro table: system configuration fields shared across Config (runtime),
2 : : // SystemDef (TOML), and BinarySystemDef (mmap).
3 : : //
4 : : // Columns:
5 : : // 1. cpp_name — field name in Config struct
6 : : // 2. cpp_type — runtime C++ type
7 : : // 3. toml_key — dotted TOML key under [system]
8 : : // 4. default_value — default for Config struct initialization
9 : : //
10 : : // Usage: define HPACTOR_SYSTEM_FIELD before including, then #undef after.
11 : : //
12 : : // // Generate struct members:
13 : : // #define HPACTOR_SYSTEM_FIELD(name, type, toml, def) type name{def};
14 : : // #include "system_fields.def"
15 : : // #undef HPACTOR_SYSTEM_FIELD
16 : :
17 : : HPACTOR_SYSTEM_FIELD(scheduler_threads, size_t, "scheduler.threads", 4)
18 : : HPACTOR_SYSTEM_FIELD(max_queue_depth, size_t, "scheduler.max_queue_depth", 1024)
19 : : HPACTOR_SYSTEM_FIELD(enable_network, bool, "network.enabled", false)
20 : : HPACTOR_SYSTEM_FIELD(tcp_port, uint16_t, "network.tcp_port", 0)
21 : 12 : HPACTOR_SYSTEM_FIELD(spawn_timeout_ms, std::chrono::milliseconds, "spawn.timeout_ms", std::chrono::milliseconds{5000})
22 : : HPACTOR_SYSTEM_FIELD(enable_http_gateway, bool, "http.enable_gateway", false)
23 : : HPACTOR_SYSTEM_FIELD(http_port, uint16_t, "http.port", 8080)
24 : : HPACTOR_SYSTEM_FIELD(http_bind_host, std::string, "http.bind_host", "0.0.0.0")
25 : : HPACTOR_SYSTEM_FIELD(http_max_connections, size_t, "http.max_connections", 1000)
26 : : HPACTOR_SYSTEM_FIELD(http_max_request_size, size_t, "http.max_request_size", 1048576)
27 : 12 : HPACTOR_SYSTEM_FIELD(http_reply_timeout_ms, std::chrono::milliseconds, "http.reply_timeout_ms", std::chrono::milliseconds{5000})
|