router

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: May 29, 2015 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	Handle(response http.ResponseWriter, request *http.Request, matches []string)
}

type HandlerFunction

type HandlerFunction func(http.ResponseWriter, *http.Request, []string)

func (HandlerFunction) Handle

func (fn HandlerFunction) Handle(response http.ResponseWriter, request *http.Request, matches []string)

type Router

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

func CreateRouter

func CreateRouter(initialRouteLimit uint) Router

func (*Router) AddRoute

func (router *Router) AddRoute(expression string, handler Handler)

func (Router) ServeHTTP

func (router Router) ServeHTTP(response http.ResponseWriter, request *http.Request)

Jump to

Keyboard shortcuts

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