proxy

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const TCPScheme = "tcp"

tcp means disable tls, tcp://

View Source
const (
	// TargetURLHeaderKey is header key to specify target URL
	TargetURLHeaderKey = "X-Bridge-Target-URL"
)

Variables

Functions

This section is empty.

Types

type DialContextFunc

type DialContextFunc = func(ctx context.Context, network string, address string) (net.Conn, error)

DialContextFunc is a type alias of the net.DialContext

type Proxy

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

Proxy represents a bridge which proxies the connection between basemachina API and any data sources in tenants.

func NewProxy

func NewProxy(logger logr.Logger) *Proxy

func (*Proxy) ServeHTTP

func (p *Proxy) ServeHTTP(rw http.ResponseWriter, req *http.Request)

type TCPProxy

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

TCPProxy represents tcp proxy.

func NewTCPProxy

func NewTCPProxy(logger logr.Logger) *TCPProxy

NewTCPProxy creates a new tcp proxy.

func (*TCPProxy) ServeWebSocket

func (p *TCPProxy) ServeWebSocket(w http.ResponseWriter, req *http.Request, target *url.URL)

ServeWebSocket serves tcp proxy over websocket.

Jump to

Keyboard shortcuts

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