config

package
v0.8.2-test-1 Latest Latest
Warning

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

Go to latest
Published: May 18, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONURL added in v0.2.0

type JSONURL struct {
	URL url.URL
}

func (*JSONURL) UnmarshalJSON added in v0.2.0

func (j *JSONURL) UnmarshalJSON(b []byte) error

UnmarshalJSON is needed to get a URL from json until golang does it on its own.

type Route

type Route struct {
	// Host or * to match any host (* must be the last rule)
	Host string
	// Port or 0/not specified for any port
	Port uint
	// Destination url string.
	Destination JSONURL
}

Route configuration. for now only does Host match to destination, see Director function. (only host,port,scheme part of Destination URL are used)

func (*Route) Match added in v0.8.0

func (r *Route) Match(req *http.Request) bool

Match checks if there is a match. Port 0/unspecified matches. Otherwise has to match and host has to match or route spec be "*".

Jump to

Keyboard shortcuts

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