proxy

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MultiHostReverseProxy

type MultiHostReverseProxy struct {
	httputil.ReverseProxy
	Directors      map[string]map[config.RouteType]map[string]func(req *http.Request)
	PolicySelector policy.Selector
	// contains filtered or unexported fields
}

MultiHostReverseProxy extends httputil to support multiple hosts with diffent policies

func NewMultiHostReverseProxy

func NewMultiHostReverseProxy(opts ...Option) *MultiHostReverseProxy

NewMultiHostReverseProxy undocummented

func (*MultiHostReverseProxy) AddHost

func (p *MultiHostReverseProxy) AddHost(policy string, target *url.URL, rt config.Route)

AddHost undocumented

func (*MultiHostReverseProxy) ServeHTTP

type Option

type Option func(o *Options)

Option defines a single option function.

func Config

func Config(val *config.Config) Option

Config provides a function to set the config option.

func Logger

func Logger(val log.Logger) Option

Logger provides a function to set the logger option.

type Options

type Options struct {
	Logger log.Logger
	Config *config.Config
}

Options defines the available options for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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