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

Function newAgentRouter

pkg/runtime/agent_router.go:31–35  ·  view source on GitHub ↗

newAgentRouter builds an agentRouter with team t and an initial current agent name. Callers are responsible for pre-validating that the initial name exists in t (NewLocalRuntime does this).

(t *team.Team, initial string)

Source from the content-addressed store, hash-verified

29// agent name. Callers are responsible for pre-validating that the initial
30// name exists in t (NewLocalRuntime does this).
31func newAgentRouter(t *team.Team, initial string) *agentRouter {
32 r := &agentRouter{team: t}
33 r.current.Store(&initial)
34 return r
35}
36
37// Name returns the name of the currently active agent.
38func (r *agentRouter) Name() string {

Calls 1

StoreMethod · 0.45