(req dto.AgentConfigFileReq)
| 1384 | } |
| 1385 | |
| 1386 | func (a AgentService) GetConfigFile(req dto.AgentConfigFileReq) (*dto.AgentConfigFile, error) { |
| 1387 | agent, _, err := a.loadAgentAndInstall(req.AgentID) |
| 1388 | if err != nil { |
| 1389 | return nil, err |
| 1390 | } |
| 1391 | content, err := os.ReadFile(agent.ConfigPath) |
| 1392 | if err != nil { |
| 1393 | return nil, err |
| 1394 | } |
| 1395 | return &dto.AgentConfigFile{Content: string(content)}, nil |
| 1396 | } |
| 1397 | |
| 1398 | func (a AgentService) UpdateConfigFile(req dto.AgentConfigFileUpdateReq) error { |
| 1399 | agent, install, err := a.loadAgentAndInstall(req.AgentID) |
nothing calls this directly
no test coverage detected