reverse

package
v0.0.0-...-daa393d Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2020 License: CC-BY-SA-4.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Proxy

type Proxy interface {
	Start() error

	ServeHTTP(http.ResponseWriter, *http.Request)
}

func NewReverseProxy

func NewReverseProxy(conf *ProxyConfig) (Proxy, error)

type ProxyConfig

type ProxyConfig struct {
	Routes     []*RouteConfig
	Port       int
	Trace      bool
	LoggingOff bool
	EnableCORS bool
}

type RouteConfig

type RouteConfig struct {
	Route     string
	TargetURL *url.URL
	PathStrip string
}

func NewRouteConfig

func NewRouteConfig(route, strip string, target *url.URL) *RouteConfig

func SingleRoute

func SingleRoute(route, strip string, target *url.URL) []*RouteConfig

func (RouteConfig) String

func (r RouteConfig) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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