binder

package
v0.0.0-...-af7e2a9 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2014 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewReverseProxyBinder

func NewReverseProxyBinder(addr, publicBaseAddr string, muxTimeout time.Duration) (httpBinder *HTTPBinder, httpsBinder *HTTPBinder, err error)

Types

type Binder

type Binder interface {
	Bind(interface{}) (net.Listener, string, error)
}

type HTTPBinder

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

func NewHTTPBinder

func NewHTTPBinder(addr, publicBaseAddr string, muxTimeout time.Duration) (*HTTPBinder, error)

func NewHTTPSBinder

func NewHTTPSBinder(addr, publicBaseAddr string, muxTimeout time.Duration, tlsConfig *tls.Config) (*HTTPBinder, error)

func (*HTTPBinder) Bind

func (b *HTTPBinder) Bind(rawOpts interface{}) (net.Listener, string, error)

func (*HTTPBinder) BindOpts

func (b *HTTPBinder) BindOpts(opts *proto.HTTPOptions) (listener net.Listener, url string, err error)

type HTTPReverseProxyConn

type HTTPReverseProxyConn struct {
	*vhost.HTTPConn
}

HTTPReverseProxyConn inspects the X-Forwarded-For header and includes either http:// or https:// in the result of Host()

func (*HTTPReverseProxyConn) Host

func (c *HTTPReverseProxyConn) Host() string

type TCPBinder

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

func NewTCPBinder

func NewTCPBinder(iface string, hostname string) *TCPBinder

Create a new TCP binder that binds ports on the given interface. The supplied hostname is only used for "display" purposes to communicate back to the clients the public hostname where the bound port can be accessed.

func (*TCPBinder) Bind

func (b *TCPBinder) Bind(rawOpts interface{}) (net.Listener, string, error)

func (*TCPBinder) BindOpts

func (b *TCPBinder) BindOpts(opts *proto.TCPOptions) (listener net.Listener, url string, err error)

type TLSBinder

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

func NewTLSBinder

func NewTLSBinder(addr, publicBaseAddr string, muxTimeout time.Duration) (*TLSBinder, error)

func (*TLSBinder) Bind

func (b *TLSBinder) Bind(rawOpts interface{}) (net.Listener, string, error)

func (*TLSBinder) BindOpts

func (b *TLSBinder) BindOpts(opts *proto.TLSOptions) (listener net.Listener, url string, err error)

Jump to

Keyboard shortcuts

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