Versions in this module Expand all Collapse all v0 v0.1.0 Mar 10, 2021 Changes in this version + const DefaultTimeout + type Handler func(Result) + type Parameter interface + func TLS(cert, key string) Parameter + type Proxy struct + func New(listen string, c ...Parameter) *Proxy + func NewContext(x context.Context, listen string, c ...Parameter) *Proxy + func (p *Proxy) AddSecondary(s ...*Switch) + func (p *Proxy) Primary(s *Switch) + func (p *Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (p *Proxy) Start() error + func (p *Proxy) Stop() error + type Result struct + Content []byte + Headers http.Header + IP string + Method string + Path string + Status uint16 + URL string + UUID string + func (r Result) IsResponse() bool + type Switch struct + Post Handler + Pre Handler + func NewSwitch(target string) (*Switch, error) + func NewSwitchTimeout(target string, t time.Duration) (*Switch, error) + func (s *Switch) RemoveRewrite(from string) + func (s *Switch) Rewrite(from, to string) + type Timeout time.Duration