func ProvideDebugMux(
	metrics metrics.Handler,
	healthz Healthz,
) DebugMux {
	mux := http.NewServeMux()
	mux.HandleFunc("/debug/pprof/cmdline", pprof.Cmdline)
	mux.HandleFunc("/debug/pprof/profile", pprof.Profile)
	mux.HandleFunc("/debug/pprof/symbol", pprof.Symbol)
	mux.HandleFunc("/debug/pprof/trace", pprof.Trace)
	mux.HandleFunc("/debug/pprof/", pprof.Index)
	mux.Handle("/healthz", healthz)
	mux.Handle("/varz", metrics)
	return DebugMux{mux}
}
ProvideDebugMux is called by wire.
package rest
import (
	"context"
	"net/http"
	"net/http/pprof"
	"strings"
	"github.com/bobvawter/cacheroach/pkg/metrics"
	"github.com/bobvawter/cacheroach/pkg/server/diag"
	"github.com/bobvawter/cacheroach/pkg/server/oidc"
	"google.golang.org/grpc"
)
type PublicMux struct {
	*http.ServeMux
}
func ProvidePublicMux(
	cliConfig CLIConfigHandler,
	connector *oidc.Connector,
	fileHandler FileHandler,
	measure metrics.Wrapper,
	provision Provision,
	retrieve Retrieve,
	rpc *grpc.Server,
) PublicMux {
	fileHandler = measure(fileHandler, "files")
	retrieve = measure(retrieve, "files")
	mux := http.NewServeMux()
	mux.HandleFunc(oidc.ReceivePath, connector.Receive)
	mux.Handle("/_/v0/config", cliConfig)
	mux.Handle("/_/v0/provision", provision)
	mux.Handle("/_/v0/retrieve/", retrieve)
	mux.Handle("/_/", http.NotFoundHandler())
	mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
		r = r.WithContext(context.WithValue(r.Context(), diag.RequestKey, r))
		if r.ProtoMajor == 2 && strings.HasPrefix(
			r.Header.Get("Content-Type"), "application/grpc") {
			rpc.ServeHTTP(w, r)
		} else {
			fileHandler.ServeHTTP(w, r)
		}
	})
	return PublicMux{mux}
}
type DebugMux struct {
	*http.ServeMux
}