http

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPProxy added in v0.2.0

type HTTPProxy struct {
	Name    string
	Address string
	Rules   []Rule
}

HTTPProxy defines a HTTPProxy data structure

func NewHTTPProxy added in v0.2.0

func NewHTTPProxy(p HTTPProxy) (*HTTPProxy, error)

NewHTTPProxy creates a new tcp proxy

func (*HTTPProxy) ListenAndServe added in v0.2.0

func (p *HTTPProxy) ListenAndServe()

ListenAndServe listens on proxy.Address and then calls Serve to handle requests on incoming connections.

func (*HTTPProxy) ServeHTTP added in v0.2.0

func (p *HTTPProxy) ServeHTTP(w http.ResponseWriter, req *http.Request)

ServeHTTP receives and handles a single http request

type HTTPSProxy added in v0.2.0

type HTTPSProxy struct {
	HTTPProxy `yaml:",inline"`
	TLS
}

HTTPSProxy defines a HTTPSProxy data structure

func NewHTTPSProxy added in v0.2.0

func NewHTTPSProxy(p HTTPSProxy) (*HTTPSProxy, error)

NewHTTPSProxy creates a new tcp proxy

func (*HTTPSProxy) ListenAndServe added in v0.2.0

func (p *HTTPSProxy) ListenAndServe()

ListenAndServe listens on proxy.Address and then calls Serve to handle requests on incoming connections.

type Header struct {
	Key   string
	Value string
}

Header defines a HTTPProxy custom Header data structure

type Rule added in v0.2.0

type Rule struct {
	Path string
	URL  string

	Headers []Header // TODO
	// contains filtered or unexported fields
}

Rule defines a HTTPProxy Rule data structure

type TLS added in v0.2.0

type TLS struct {
	Cert string
	Key  string
}

TLS defines a HTTPSProxy TLS data structure

Jump to

Keyboard shortcuts

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