k8s

package
v1.19.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultTunnelProxyDispatcher = NewTunnelProxyDispatcher("cluster_id", "sub_path")

Functions

This section is empty.

Types

type ClusterHandlerInstance

type ClusterHandlerInstance struct {
	ServerAddress string
	Handler       http.Handler
}

type TunnelProxyDispatcher

type TunnelProxyDispatcher struct {
	// ClusterVarName is the path parameter name of cluster_id
	ClusterVarName string
	// SubPathVarName is the path parameter name of sub-path needs to be forwarded
	SubPathVarName string
	// contains filtered or unexported fields
}

TunnelProxyDispatcher is the handler which dispatch and proxy the incoming requests to external kube-apiserver with websocket tunnel

func NewTunnelProxyDispatcher

func NewTunnelProxyDispatcher(clusterVarName, subPathVarName string) *TunnelProxyDispatcher

NewTunnelProxyDispatcher new a default TunnelProxyDispatcher

func (*TunnelProxyDispatcher) ExtractPathPrefix

func (f *TunnelProxyDispatcher) ExtractPathPrefix(req *http.Request) string

ExtractPathPrefix extracts the path prefix which needs to be stripped when the request is forwarded to the reverse proxy handler.

func (*TunnelProxyDispatcher) ServeHTTP

func (f *TunnelProxyDispatcher) ServeHTTP(rw http.ResponseWriter, req *http.Request)

type WsTunnel

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

Jump to

Keyboard shortcuts

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