switcher

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package switcher 按域名进行路由分类

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Switcher

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

Switcher 实现按域名进行路由

func New

func New() *Switcher

New 声明新的 Switcher 实例

func (*Switcher) AddHost

func (s *Switcher) AddHost(h http.Handler, domain ...string)

AddHost 添加域名信息

func (*Switcher) ServeHTTP

func (s *Switcher) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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