Start starts the http server.
(mux *mux.Router, address, cert, key string)
| 22 | |
| 23 | // Start starts the http server. |
| 24 | func 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 | |
| 30 | func startServer(mux *mux.Router, address, cert, key string) (*http.Server, chan error) { |
| 31 | srv := &http.Server{ |