connect

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 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 RequestFilterFunc

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), nonManagedResponses ...string) *Proxy

func NewProxyForDockerCli added in v0.0.3

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

func (*Proxy) AddListener

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

func (*Proxy) FilterRequests added in v0.0.2

func (p *Proxy) FilterRequests(urlPattern string, filterFunc RequestFilterFunc)

func (*Proxy) FilterResponses added in v0.0.2

func (p *Proxy) FilterResponses(urlPattern string, filterFunc ResponseFilterFunc)

func (*Proxy) Handle

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

func (*Proxy) Process

func (p *Proxy) Process() error

type RequestFilterFunc added in v0.0.2

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

func FilterRequestAsJson added in v0.0.2

func FilterRequestAsJson(provideValue func() T, change func(T) T) RequestFilterFunc

type ResponseFilterFunc added in v0.0.2

type ResponseFilterFunc func(resp *http.Response, body []byte) (*http.Response, error)

func FilterResponseAsJson added in v0.0.3

func FilterResponseAsJson(provideValue func() T, change func(T) T) ResponseFilterFunc

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