MCPcopy Create free account
hub / github.com/danderson/netboot / serveHTTP

Function serveHTTP

pixiecore/http.go:30–39  ·  view source on GitHub ↗
(l net.Listener, handlers ...func(*http.ServeMux))

Source from the content-addressed store, hash-verified

28)
29
30func serveHTTP(l net.Listener, handlers ...func(*http.ServeMux)) error {
31 mux := http.NewServeMux()
32 for _, h := range handlers {
33 h(mux)
34 }
35 if err := http.Serve(l, mux); err != nil {
36 return fmt.Errorf("HTTP server shut down: %s", err)
37 }
38 return nil
39}
40
41func (s *Server) serveHTTP(mux *http.ServeMux) {
42 mux.HandleFunc("/_/ipxe", s.handleIpxe)

Callers 1

ServeMethod · 0.85

Calls 1

ServeMethod · 0.45

Tested by

no test coverage detected