MCPcopy Index your code
hub / github.com/go-dev-frame/sponge / Shutdown

Method Shutdown

pkg/httpsrv/http.go:68–73  ·  view source on GitHub ↗

Shutdown gracefully shuts down the server and releases resources.

(ctx context.Context)

Source from the content-addressed store, hash-verified

66
67// Shutdown gracefully shuts down the server and releases resources.
68func (s *Server) Shutdown(ctx context.Context) error {
69 if s.server == nil {
70 return nil
71 }
72 return s.server.Shutdown(ctx)
73}
74
75// runHTTP starts the server in http mode, without TLS.
76func (s *Server) runHTTP() error {

Callers 15

RunMethod · 0.95
TestServerHTTPServiceFunction · 0.45
TestClientHTTPServiceFunction · 0.45
shutDownRedirectHTTPMethod · 0.45
TestServer_Run_HTTPFunction · 0.45
TestServer_ShutdownFunction · 0.45
CloseFunction · 0.45
CloseMethod · 0.45

Calls

no outgoing calls

Tested by 9

TestServerHTTPServiceFunction · 0.36
TestClientHTTPServiceFunction · 0.36
TestServer_Run_HTTPFunction · 0.36
TestServer_ShutdownFunction · 0.36
TestHTTPServerMockFunction · 0.36