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

Method RegisterAgent

pkg/asteros/asteros.go:141–151  ·  view source on GitHub ↗

RegisterAgent 注册 Agent

(id string, ag *agent.Agent)

Source from the content-addressed store, hash-verified

139
140// RegisterAgent 注册 Agent
141func (os *AsterOS) RegisterAgent(id string, ag *agent.Agent) error {
142 // 注册到 Registry
143 if err := os.registry.RegisterAgent(id, ag); err != nil {
144 return err
145 }
146
147 // 通知所有 Interfaces
148 os.notifyAgentRegistered(ag)
149
150 return nil
151}
152
153// RegisterRoom 注册 Room
154func (os *AsterOS) RegisterRoom(id string, r *core.Room) error {

Callers

nothing calls this directly

Calls 2

notifyAgentRegisteredMethod · 0.95
RegisterAgentMethod · 0.65

Tested by

no test coverage detected