(scan_id: String, target: String, output_dir: PathBuf)
| 42 | |
| 43 | impl ProgressTracker { |
| 44 | pub fn new(scan_id: String, target: String, output_dir: PathBuf) -> Self { |
| 45 | let tracker = Self { |
| 46 | scan_id, |
| 47 | target, |
| 48 | output_dir: output_dir.clone(), |
| 49 | events: Arc::new(Mutex::new(Vec::new())), |
| 50 | }; |
| 51 | |
| 52 | // Criar diretório se não existir |
| 53 | fs::create_dir_all(&output_dir).ok(); |
| 54 | |
| 55 | tracker |
| 56 | } |
| 57 | |
| 58 | /// Adiciona um evento e salva no arquivo |
| 59 | pub fn add_event(&self, event_type: EventType, message: String, progress: f32, details: Option<serde_json::Value>) { |
nothing calls this directly
no outgoing calls
no test coverage detected