route

package
Version: v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2014 License: Apache-2.0, 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

Source Files

Directories

Path Synopsis
see http://godoc.org/github.com/mailgun/route for documentation on the language
see http://godoc.org/github.com/mailgun/route for documentation on the language
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