1
0

feat: 新增 TCP checker,支持端口可达性探测与 banner 读取

- 新增 src/server/checker/runner/tcp/ 自包含目录(types/schema/validate/execute/expect)
- 注册 TcpChecker 到 checkerRegistry,schema/engine/store/config-loader 自动委托
- 支持 expect.connected 正反向语义(默认期待可达,可配置期待不可达)
- 支持 readBanner opt-in banner 读取,受 bannerReadTimeout + maxBannerBytes 双重限制
- 复用电有 expect/operator/duration/failure 基础设施
- 新增 3 个测试文件 51 条用例(execute/validate/expect),全量 634 测试通过
- 更新 README/DEVELOPMENT/probes.example.yaml,新增 tcp-checker capability spec
This commit is contained in:
2026-05-17 23:53:37 +08:00
parent 31fd3a2a43
commit 0a9a9016be
18 changed files with 1841 additions and 8 deletions

View File

@@ -145,3 +145,28 @@ targets:
exists: true
role:
contains: "engineer"
# ========== TCP targets ==========
- id: "redis-port"
name: "Redis 端口可达"
type: tcp
group: "基础设施"
tcp:
host: "127.0.0.1"
port: 6379
expect:
maxDurationMs: 3000
- id: "smtp-banner"
name: "SMTP Banner 探测"
type: tcp
group: "基础设施"
tcp:
host: "127.0.0.1"
port: 25
readBanner: true
bannerReadTimeout: 3000
expect:
banner:
contains: "ESMTP"