MCPcopy Create free account
hub / github.com/astercloud/aster / RegisterAgent

Method RegisterAgent

pkg/desktop/desktop.go:292–298  ·  view source on GitHub ↗

RegisterAgent registers an agent with the app

(ag *agent.Agent)

Source from the content-addressed store, hash-verified

290
291// RegisterAgent registers an agent with the app
292func (a *App) RegisterAgent(ag *agent.Agent) error {
293 a.agentsMu.Lock()
294 defer a.agentsMu.Unlock()
295
296 a.agents[ag.ID()] = ag
297 return a.bridge.RegisterAgent(ag)
298}
299
300// GetAgent returns an agent by ID
301func (a *App) GetAgent(id string) (*agent.Agent, bool) {

Callers 1

mainFunction · 0.95

Calls 2

IDMethod · 0.65
RegisterAgentMethod · 0.65

Tested by

no test coverage detected