Stop 停止引擎(简化版本)
()
| 53 | |
| 54 | // Stop 停止引擎(简化版本) |
| 55 | func (e *Engine) Stop() error { |
| 56 | e.mu.Lock() |
| 57 | defer e.mu.Unlock() |
| 58 | |
| 59 | if !e.running { |
| 60 | return nil |
| 61 | } |
| 62 | |
| 63 | // 缓存管理器已移除 |
| 64 | |
| 65 | // 停止连接管理器 |
| 66 | if err := e.connections.Stop(); err != nil { |
| 67 | fmt.Printf("停止连接管理器失败: %v\n", err) |
| 68 | } |
| 69 | |
| 70 | e.running = false |
| 71 | return nil |
| 72 | } |
| 73 | |
| 74 | // CheckDomain 检测单个域名(直接使用pipeline,简化架构) |
| 75 | func (e *Engine) CheckDomain(ctx context.Context, domain string) (*types.DetectionResult, error) { |
no outgoing calls
no test coverage detected