MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / GetConfigFile

Method GetConfigFile

agent/app/service/agents.go:1386–1396  ·  view source on GitHub ↗
(req dto.AgentConfigFileReq)

Source from the content-addressed store, hash-verified

1384}
1385
1386func (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
1398func (a AgentService) UpdateConfigFile(req dto.AgentConfigFileUpdateReq) error {
1399 agent, install, err := a.loadAgentAndInstall(req.AgentID)

Callers

nothing calls this directly

Calls 1

loadAgentAndInstallMethod · 0.95

Tested by

no test coverage detected