重构 auto-check:拆分包架构,精简 workflow 为纯调度循环
各包职责: - config: 分类 YAML 配置 - model: Device/IP/MAC 公共类型 - discovery: 扫描 + ARP MAC 解析 + Devices 变量 - sshclient: SSH 连接 - stress: stress-ng/stressapptest 压测 + Results 变量 - report: 80mm 热敏模板/sparkline/打印 + Printed 变量 - workflow: 永久循环调度 + Start/Stop workflow 已精简为 100 行纯编排,所有业务逻辑下沉各包
This commit is contained in:
@@ -49,7 +49,17 @@ type StressConfig struct {
|
||||
|
||||
// ReportConfig 报告
|
||||
type ReportConfig struct {
|
||||
Path string `yaml:"path"`
|
||||
Path string `yaml:"path"` // 报告保存路径
|
||||
Print PrintConfig `yaml:"print"` // 打印配置
|
||||
}
|
||||
|
||||
// PrintConfig 打印配置
|
||||
type PrintConfig struct {
|
||||
Enabled bool `yaml:"enabled"` // 是否打印
|
||||
Backend string `yaml:"backend"` // system / escpos / usb / file
|
||||
Device string `yaml:"device"` // 目标:打印机名 / host:port / 设备路径 / 文件路径
|
||||
Width int `yaml:"width"` // 行宽,80mm=42
|
||||
Charset string `yaml:"charset"` // 字符集(默认 utf-8)
|
||||
}
|
||||
|
||||
// WorkflowConfig 工作流
|
||||
|
||||
Reference in New Issue
Block a user