MCPcopy Index your code
hub / github.com/docker/docker-agent / AgentToolsetStatuses

Method AgentToolsetStatuses

pkg/runtime/runtime.go:1010–1021  ·  view source on GitHub ↗

AgentToolsetStatuses returns one ToolsetStatus per toolset of the named agent, in declaration order. It mirrors CurrentAgentToolsetStatuses but for an arbitrary agent and is side-effect-free: it reads each toolset's live lifecycle (state, kind, last error, restart count) without starting it. Unknown

(name string)

Source from the content-addressed store, hash-verified

1008// lifecycle (state, kind, last error, restart count) without starting it.
1009// Unknown agents yield nil, so callers degrade gracefully.
1010func (r *LocalRuntime) AgentToolsetStatuses(name string) []tools.ToolsetStatus {
1011 a, err := r.team.Agent(name)
1012 if err != nil || a == nil {
1013 return nil
1014 }
1015 toolSets := a.ToolSets()
1016 statuses := make([]tools.ToolsetStatus, 0, len(toolSets))
1017 for _, ts := range toolSets {
1018 statuses = append(statuses, toolsetStatusFor(ts))
1019 }
1020 return statuses
1021}
1022
1023// RestartToolset locates the named toolset on the active agent and
1024// asks it to restart in place. The supervisor closes the current

Callers 1

TestAgentToolsetStatusesFunction · 0.95

Calls 3

toolsetStatusForFunction · 0.85
AgentMethod · 0.80
ToolSetsMethod · 0.80

Tested by 1

TestAgentToolsetStatusesFunction · 0.76