Documentation ¶ Index ¶ type Router func New() *Router func (r *Router) Build() router.Router func (r *Router) Default(def router.Builder) *Router func (r *Router) Host(host string, other router.Builder) *Router Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Router ¶ type Router struct { // contains filtered or unexported fields } func New ¶ func New() *Router New returns a new instance of the virtual Router func (*Router) Build ¶ added in v0.17.0 func (r *Router) Build() router.Router func (*Router) Default ¶ func (r *Router) Default(def router.Builder) *Router Default sets the default router to route requests, Host header value of which aren't matched. Note: only requests with 0 or 1 Host header values may be passed into the default router. If there are more than 1 value, the request will be refused func (*Router) Host ¶ func (r *Router) Host(host string, other router.Builder) *Router Host adds a new virtual router. If 0.0.0.0 is passed, the router will be set as a default one Source Files ¶ View all Source files virtual.go Directories ¶ Show internal Expand all Path Synopsis internal domain Click to show internal directories. Click to hide internal directories.