feat(core): services.yaml 启动配置 + _run.sh 统一参数透传
Step 1: init.txt → services.yaml - 新增 InitParser (yaml-cpp), 支持 YAML/TXT 双模式解析, 向后兼容 init.txt - 新增 services.yaml 声明式服务配置 (name/cmd/args/depends_on/sleep_before) - 改造 pmc_mtd.cpp 集成 InitParser, 支持目录/.yaml/.txt 三种路径模式 - Makefile 添加 InitParser 编译目标 + -lyaml-cpp 链接 - setup 脚本添加 libyaml-cpp-dev / yaml-cpp-devel 依赖 - core/_run.sh 改为 -i . (目录模式, 自动查找 services.yaml → init.txt) Step 2: 11 个 _run.sh 统一参数透传 - 8 个脚本改动: 追加 "$@" / 移除 sleep / 修引号 - waf 保留 -c config.yaml 作为脚本默认值 - services.yaml waf args 改为 [] 避免重复传递 - 开发方案文档: docs/reports/core_services_yaml_dev_doc.md
This commit is contained in:
1 parent
bba7ee3eb4
commit
08df3929b2
18 files changed
+1144
-42
No files matched your search
+1
-1
@@ -149,7 +149,7 @@ int main(int argc, char** argv) {
|
||||
("list", "list process all run") /* 列出运行中的进程 */
|
||||
("kill", po::value<int>(), "kill a process") /* 杀死一个进程 */
|
||||
/********* 子系统服务模式 ********/
|
||||
("init,i", po::value<std::string>(), "self-init list") /* 输入自启动列表 */
|
||||
("init,i", po::value<std::string>(), "self-init config (dir or .yaml/.txt file)") /* 输入自启动配置 */
|
||||
("serve", po::value<int>(), "Run as http server") /* 启用http伺服器 */
|
||||
("confs", po::value<int>(), "Run embedded confs rpc server"); /* 启用内嵌confs配置服务 */
|
||||
|
||||
|
||||
Reference in new issue
Block a user