virtual

package
v0.17.3 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2025 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) 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

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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