hostrouter

package
v0.0.0-...-cf0bdef Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LowerCasedHostFromHeader

func LowerCasedHostFromHeader(r *http.Request) string

Types

type HostRouter

type HostRouter struct {
	Items        interface{}
	Threshold    int
	PatternItems []RouterGlobItem
	NotFound     mchain.Handler
	HostFunc     func(*http.Request) string
}

func New

func New() *HostRouter

func (*HostRouter) Build

func (h *HostRouter) Build() mchain.Handler

func (*HostRouter) BuildHttp

func (h *HostRouter) BuildHttp(errorHandler mchain.ErrorHandler) http.Handler

func (*HostRouter) Clone

func (h *HostRouter) Clone() *HostRouter

func (*HostRouter) HandleHost

func (h *HostRouter) HandleHost(host string, handler mchain.Handler)

func (*HostRouter) HandlePattern

func (h *HostRouter) HandlePattern(globPattern string, handler mchain.Handler)

type RouterGlobItem

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

type RouterItem

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

Jump to

Keyboard shortcuts

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