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

Method loadAgentConfig

agent/app/service/agents.go:1481–1491  ·  view source on GitHub ↗
(agentID uint)

Source from the content-addressed store, hash-verified

1479}
1480
1481func (a AgentService) loadAgentConfig(agentID uint) (*model.Agent, *model.AppInstall, map[string]interface{}, error) {
1482 agent, install, err := a.loadAgentAndInstall(agentID)
1483 if err != nil {
1484 return nil, nil, nil, err
1485 }
1486 conf, err := readOpenclawConfig(agent.ConfigPath)
1487 if err != nil {
1488 return nil, nil, nil, err
1489 }
1490 return agent, install, conf, nil
1491}
1492
1493func (a AgentService) loadOpenclawAgentConfig(agentID uint) (*model.Agent, *model.AppInstall, map[string]interface{}, error) {
1494 agent, install, conf, err := a.loadAgentConfig(agentID)

Callers 6

mutateAgentConfigMethod · 0.95
GetConfiguredAgentsMethod · 0.95
GetRoleChannelsMethod · 0.95
DeleteRoleMethod · 0.95
operateRoleBindingMethod · 0.95

Calls 2

loadAgentAndInstallMethod · 0.95
readOpenclawConfigFunction · 0.85

Tested by

no test coverage detected