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

Method List

pkg/core/pool.go:78–89  ·  view source on GitHub ↗

List 列出所有 Agent ID

(prefix string)

Source from the content-addressed store, hash-verified

76
77// List 列出所有 Agent ID
78func (p *Pool) List(prefix string) []string {
79 p.mu.RLock()
80 defer p.mu.RUnlock()
81
82 ids := make([]string, 0, len(p.agents))
83 for id := range p.agents {
84 if prefix == "" || strings.HasPrefix(id, prefix) {
85 ids = append(ids, id)
86 }
87 }
88 return ids
89}
90
91// Status 获取 Agent 状态
92func (p *Pool) Status(agentID string) (*types.AgentStatus, error) {

Callers 1

TestPool_ListFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestPool_ListFunction · 0.76