Documentation ¶
Overview ¶
Package triemux implements an HTTP multiplexer, or URL router, which can be used to serve responses from multiple distinct handlers within a single URL hierarchy.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterMetrics ¶
func RegisterMetrics(r prometheus.Registerer)
Types ¶
type Mux ¶
type Mux struct {
// contains filtered or unexported fields
}
func (*Mux) Handle ¶
Handle adds a route (either an exact path or a path prefix) to the Mux and and associates it with a handler, so that the Mux will pass matching requests to that handler.
func (*Mux) RouteCount ¶
func (*Mux) ServeHTTP ¶
func (mux *Mux) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP forwards the request to a backend with a registered route matching the request path. Serves 404 when there is no backend. Serves 301 redirect to lowercase path when the URL path is entirely uppercase. Serves 503 when no routes are loaded.
Click to show internal directories.
Click to hide internal directories.