Remove old eBPF implementations - keep only new BCC-style concurrent tracing

This commit is contained in:
Harshavardhan Musanalli
2025-11-08 14:56:56 +01:00
parent 8328f8d5b3
commit 190e54dd38
10 changed files with 326 additions and 1613 deletions

View File

@@ -348,14 +348,19 @@ func (s *InvestigationServer) handleDiagnosticExecution(requestBody map[string]i
// Execute all commands
commandResults := make([]CommandResult, 0, len(diagnosticResp.Commands))
for _, cmd := range diagnosticResp.Commands {
for i, cmdStr := range diagnosticResp.Commands {
// Convert string to Command struct
cmd := Command{
ID: fmt.Sprintf("cmd_%d", i),
Command: cmdStr,
Description: fmt.Sprintf("Investigation command: %s", cmdStr),
}
fmt.Printf("⚙️ Executing command '%s': %s\n", cmd.ID, cmd.Command)
// Use the agent's executor to run the command
result := s.agent.executor.Execute(cmd)
commandResults = append(commandResults, result)
if result.Error != "" {
fmt.Printf("⚠️ Command '%s' had error: %s\n", cmd.ID, result.Error)
}
@@ -471,7 +476,6 @@ func (s *InvestigationServer) handlePendingInvestigation(investigation PendingIn
return
}
}
// updateInvestigationStatus updates the status of a pending investigation