- 新增 task_report 任务级聚合指标 task_metrics - 补充创建任务幂等与失败路径/冲突测试 - 将后端测试基线提升到 20 passed - 新增 edge-agent 初始化代码、启动脚本与打包脚本 - 新增 http_health_check、check_port、check_process、grep_log 执行器 - 补充 edge-agent 基础测试并提升基线到 10 passed - 同步更新 backend README 与当前进度总结
27 lines
1012 B
Python
27 lines
1012 B
Python
from __future__ import annotations
|
|
|
|
from app.executors.log_executor import GrepLogExecutor
|
|
from app.executors.http_executor import HttpHealthCheckExecutor
|
|
from app.executors.port_executor import PortCheckExecutor
|
|
from app.executors.process_executor import ProcessCheckExecutor
|
|
from app.executors.linux_service_executor import LinuxServiceExecutor
|
|
from app.executors.windows_service_executor import WindowsServiceExecutor
|
|
|
|
|
|
class ToolRegistry:
|
|
def __init__(self) -> None:
|
|
self._executors = {
|
|
"http_health_check": HttpHealthCheckExecutor(),
|
|
"check_port": PortCheckExecutor(),
|
|
"check_process": ProcessCheckExecutor(),
|
|
"grep_log": GrepLogExecutor(),
|
|
"linux_service_control": LinuxServiceExecutor(),
|
|
"windows_service_control": WindowsServiceExecutor(),
|
|
}
|
|
|
|
def capabilities(self) -> list[str]:
|
|
return sorted(self._executors.keys())
|
|
|
|
def get(self, tool_name: str):
|
|
return self._executors.get(tool_name)
|