dispatcher

package
v5.0.0-...-beacedc Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2014 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dispatch

func Dispatch(d Dispatcher) *dispatch

func Match

func Match(data ...interface{}) http.Handler

data should be pairs of Matcher and http.Handler

Types

type DispatchFunc

type DispatchFunc func(*http.Request) http.Handler

func (DispatchFunc) Dispatch

func (df DispatchFunc) Dispatch(r *http.Request) http.Handler

type Dispatcher

type Dispatcher interface {
	Dispatch(*http.Request) http.Handler
}

type MatchHost

type MatchHost string

func (MatchHost) Match

func (mh MatchHost) Match(r *http.Request) bool

type MatchHostRegex

type MatchHostRegex regexp.Regexp

func (*MatchHostRegex) Match

func (mhr *MatchHostRegex) Match(r *http.Request) bool

type MatchQuery

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

func (MatchQuery) Match

func (m MatchQuery) Match(r *http.Request) bool

type MatchScheme

type MatchScheme string

func (MatchScheme) Match

func (m MatchScheme) Match(r *http.Request) bool

type Matcher

type Matcher interface {
	Match(*http.Request) bool
}

Jump to

Keyboard shortcuts

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