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 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)
Click to show internal directories.
Click to hide internal directories.