router

package
v1.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Router

type Router struct {
	// contains filtered or unexported fields
}

Router routes incoming HTTP requests to the adequate handler based on their URL path.

func (*Router) DeregisterPath

func (r *Router) DeregisterPath(urlPath string)

DeregisterPath de-registers the HTTP handler for the given URL path.

func (*Router) RegisterPath

func (r *Router) RegisterPath(urlPath string, h http.Handler)

RegisterPath registers a HTTP handler for serving requests at the given URL path.

func (*Router) ServeHTTP

func (r *Router) ServeHTTP(w http.ResponseWriter, req *http.Request)

ServeHTTP implements http.Handler.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL