MCPcopy Index your code
hub / github.com/screego/server / Start

Function Start

server/server.go:24–28  ·  view source on GitHub ↗

Start starts the http server.

(mux *mux.Router, address, cert, key string)

Source from the content-addressed store, hash-verified

22
23// Start starts the http server.
24func Start(mux *mux.Router, address, cert, key string) error {
25 server, shutdown := startServer(mux, address, cert, key)
26 shutdownOnInterruptSignal(server, 2*time.Second, shutdown)
27 return waitForServerToClose(shutdown)
28}
29
30func startServer(mux *mux.Router, address, cert, key string) (*http.Server, chan error) {
31 srv := &http.Server{

Callers 4

serveCmdFunction · 0.92
TestShutdownAfterErrorFunction · 0.70
TestShutdownFunction · 0.70

Calls 3

startServerFunction · 0.85
waitForServerToCloseFunction · 0.85

Tested by 3

TestShutdownAfterErrorFunction · 0.56
TestShutdownFunction · 0.56