MCPcopy
hub / github.com/docker/docker-agent / runA2ACommand

Method runA2ACommand

cmd/root/a2a.go:43–61  ·  view source on GitHub ↗
(cmd *cobra.Command, args []string)

Source from the content-addressed store, hash-verified

41}
42
43func (f *a2aFlags) runA2ACommand(cmd *cobra.Command, args []string) (commandErr error) {
44 ctx := cmd.Context()
45 telemetry.TrackCommand(ctx, "serve", append([]string{"a2a"}, args...))
46 defer func() { // do not inline this defer so that commandErr is not resolved early
47 telemetry.TrackCommandError(ctx, "serve", append([]string{"a2a"}, args...), commandErr)
48 }()
49
50 out := cli.NewPrinter(cmd.OutOrStdout())
51 agentFilename := args[0]
52
53 ln, cleanup, err := newListener(ctx, f.listenAddr)
54 if err != nil {
55 return err
56 }
57 defer cleanup()
58
59 out.Println("Listening on", ln.Addr().String())
60 return a2a.Run(ctx, agentFilename, f.agentName, f.sessionDB, &f.runConfig, ln)
61}

Callers

nothing calls this directly

Calls 8

PrintlnMethod · 0.95
TrackCommandFunction · 0.92
TrackCommandErrorFunction · 0.92
NewPrinterFunction · 0.92
RunFunction · 0.92
newListenerFunction · 0.85
ContextMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected