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

Function loadTeam

pkg/chatserver/server.go:161–171  ·  view source on GitHub ↗

loadTeam resolves and loads the team referenced by agentFilename.

(ctx context.Context, agentFilename string, runConfig *config.RuntimeConfig)

Source from the content-addressed store, hash-verified

159
160// loadTeam resolves and loads the team referenced by agentFilename.
161func loadTeam(ctx context.Context, agentFilename string, runConfig *config.RuntimeConfig) (*team.Team, error) {
162 src, err := config.Resolve(agentFilename, nil)
163 if err != nil {
164 return nil, err
165 }
166 t, err := teamloader.Load(ctx, src, runConfig, loaderdefaults.Opts()...)
167 if err != nil {
168 return nil, fmt.Errorf("failed to load agents: %w", err)
169 }
170 return t, nil
171}
172
173// serve runs httpServer on ln until ctx is cancelled, then triggers a
174// graceful shutdown.

Callers 1

RunFunction · 0.85

Calls 2

ResolveFunction · 0.92
LoadFunction · 0.92

Tested by

no test coverage detected