route

package
v0.0.0-...-a5469ec Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2015 License: Apache-2.0 Imports: 2 Imported by: 2

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 <What to match><Matching verb> and || and && operators.
Expression based request router, supports functions and combinations of functions in form <What to match><Matching verb> and || and && operators.
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