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

Method getAgentConfig

pkg/server/server.go:188–207  ·  view source on GitHub ↗
(c echo.Context)

Source from the content-addressed store, hash-verified

186}
187
188func (s *Server) getAgentConfig(c echo.Context) error {
189 agentID := c.Param("id")
190
191 for k, agentSource := range s.sm.Sources {
192 if k != agentID {
193 continue
194 }
195
196 slog.Debug("API source", "source", agentSource.Name())
197 cfg, err := config.Load(c.Request().Context(), agentSource)
198 if err != nil {
199 slog.Error("Failed to load config from API source", "key", k, "error", err)
200 continue
201 }
202
203 return c.JSON(http.StatusOK, cfg)
204 }
205
206 return echo.NewHTTPError(http.StatusNotFound)
207}
208
209func (s *Server) getSessions(c echo.Context) error {
210 sessions, err := s.sm.GetSessions(c.Request().Context())

Callers

nothing calls this directly

Calls 5

LoadFunction · 0.92
DebugMethod · 0.80
ContextMethod · 0.80
NameMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected