Needed mostly to be able to mock it in the sensor tests.
| 256 | |
| 257 | // Needed mostly to be able to mock it in the sensor tests. |
| 258 | type Processor interface { |
| 259 | // Current location of the artifacts folder. |
| 260 | ArtifactsDir() string |
| 261 | |
| 262 | // Enumerate all files under a given root (used later on to tell the files |
| 263 | // that were created during probing and the existed files appart). |
| 264 | GetCurrentPaths(root string, excludes []string) (map[string]struct{}, error) |
| 265 | |
| 266 | // Create the artifacts folder, preserve some files, etc. |
| 267 | PrepareEnv(cmd *command.StartMonitor) error |
| 268 | |
| 269 | // Dump the creport and the files to the artifacts folder. |
| 270 | Process( |
| 271 | cmd *command.StartMonitor, |
| 272 | mountPoint string, |
| 273 | peReport *report.PeMonitorReport, |
| 274 | fanReport *report.FanMonitorReport, |
| 275 | ptReport *report.PtMonitorReport, |
| 276 | ) error |
| 277 | |
| 278 | // Archives commands.json, creport.json, events.json, sensor.log, etc |
| 279 | // to a tar ball. |
| 280 | Archive() error |
| 281 | } |
| 282 | |
| 283 | type processor struct { |
| 284 | seReport *report.SensorReport |
no outgoing calls
no test coverage detected