virtual

package
v0.16.3 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

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) Default

func (r *Router) Default(def router.Fabric) *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.Fabric) *Router

Host adds a new virtual router. If 0.0.0.0 is passed, the router will be set as a default one

func (*Router) Initialize

func (r *Router) Initialize() router.Router

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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