route

package
v0.0.0-...-291c114 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2014 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Route the request to a location

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConstRouter

type ConstRouter struct {
	Location Location
}

Helper router that always the same location

func (*ConstRouter) Route

func (m *ConstRouter) Route(req Request) (Location, error)

type Router

type Router interface {
	// if error is not nil, the request wll be aborted and error will be proxied to client.
	// if location is nil and error is nil, that means that router did not find any matching location
	Route(req Request) (Location, error)
}

Router matches incoming request to a specific location

Directories

Path Synopsis
Expression based request router, supports functions and combinations of functions in form
Expression based request router, supports functions and combinations of functions in form
Route the request by hostname
Route the request by hostname
Route the request by path
Route the request by path

Jump to

Keyboard shortcuts

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