connect

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2018 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogLevel_DEBUG int = iota
	LogLevel_INFO  int = iota
	LogLevel_WARN  int = iota
	LogLevel_ERROR int = iota
	LogLevel_NONE  int = iota
)

Variables

This section is empty.

Functions

func SetLogLevel

func SetLogLevel(newLevel int)

Types

type CriticalFailure

type CriticalFailure filterFailure

func NewCriticalFailure

func NewCriticalFailure(cause interface{}, category string) CriticalFailure

func (CriticalFailure) Error

func (cf CriticalFailure) Error() string

type FilterFunc

type FilterFunc func(req *http.Request, body []byte) (*http.Request, error)

func FilterAsJson

func FilterAsJson(provideValue func() T, change func(T) T) FilterFunc

type Proxy

type Proxy struct {
	// contains filtered or unexported fields
}

func NewProxy

func NewProxy(remote func() (net.Conn, error)) *Proxy

func (*Proxy) AddListener

func (p *Proxy) AddListener(prefix string, listener net.Listener)

func (*Proxy) Handle

func (p *Proxy) Handle(urlPattern string, filterFunc FilterFunc)

func (*Proxy) Process

func (p *Proxy) Process() error

type SoftFailure

type SoftFailure filterFailure

func NewSoftFailure

func NewSoftFailure(cause interface{}, category string) SoftFailure

func (SoftFailure) Error

func (sf SoftFailure) Error() string

type T

type T interface{}

Jump to

Keyboard shortcuts

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