MCPcopy
hub / github.com/googleapis/mcp-toolbox / Shutdown

Method Shutdown

internal/server/server.go:681–684  ·  view source on GitHub ↗

Shutdown gracefully shuts down the server without interrupting any active connections. It uses http.Server.Shutdown() and has the same functionality.

(ctx context.Context)

Source from the content-addressed store, hash-verified

679// Shutdown gracefully shuts down the server without interrupting any active
680// connections. It uses http.Server.Shutdown() and has the same functionality.
681func (s *Server) Shutdown(ctx context.Context) error {
682 s.logger.DebugContext(ctx, "shutting down the server.")
683 return s.srv.Shutdown(ctx)
684}
685
686func (s *Server) Addr() string {
687 return s.listener.Addr().String()

Callers 6

TestPRMEndpointFunction · 0.95
TestPRMOverrideFunction · 0.95
TestLegacyAPIGoneFunction · 0.95
TestMCPAuthMiddlewareFunction · 0.95
runFunction · 0.95
runServeFunction · 0.95

Calls 1

DebugContextMethod · 0.65

Tested by 4

TestPRMEndpointFunction · 0.76
TestPRMOverrideFunction · 0.76
TestLegacyAPIGoneFunction · 0.76
TestMCPAuthMiddlewareFunction · 0.76