Documentation ¶
Overview ¶
Package proxy implements a simple network proxy for tests
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Link ¶
type Link interface { fmt.Stringer // Listen returns a listener to the local side of the link Listen() (net.Listener, error) // Dials dials to the remote side of the link Dial() (net.Conn, error) // Close closes the local link Close() error }
Link allows to build a proxying link between two endpoints.
type NetLink ¶
type NetLink struct { // Local specifies the local side of the connection Local net.Listener // Upstream specifies the remote side of the connection Upstream string }
NetLink links two network endpoints. Implements Link
type Proxy ¶
type Proxy struct { log.FieldLogger // NotifyCh signals new connections NotifyCh chan<- struct{} // StartedCh signals when proxy starts servicing StartedCh chan<- struct{} // contains filtered or unexported fields }
Proxy defines a link between two endpoints
Click to show internal directories.
Click to hide internal directories.