proxy

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExplorerProxy

func NewExplorerProxy() http.Handler

NewExplorerProxy return proxy handler for kube-explorer

func NewK8sProxy added in v0.5.0

func NewK8sProxy() http.Handler

func NewProxy added in v0.5.0

func NewProxy(prefix string) http.Handler

NewProxy return http proxy handler

Types

type ExplorerHandler

type ExplorerHandler struct {
}

func (*ExplorerHandler) ServeHTTP

func (ep *ExplorerHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request)

ServeHTTP handles the proxy request for kube-explorer

type K8sProxyHandler added in v0.5.0

type K8sProxyHandler struct{}

func (*K8sProxyHandler) ServeHTTP added in v0.5.0

func (kh *K8sProxyHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request)

type RemoteHandler

type RemoteHandler struct {
	Location *url.URL
}

RemoteHandler handle proxy request for remote service

func (*RemoteHandler) ServeHTTP

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

ServeHTTP handles proxy request

type Transport

type Transport struct {
	Scheme      string
	Host        string
	PathPrepend string

	http.RoundTripper
}

Transport is a transport for text/html content that replaces URLs in html content with the prefix of the proxy server Borrowed from https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/util/proxy/transport.go

func (*Transport) RoundTrip

func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip implements the http.RoundTripper interface Borrowed from https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/util/proxy/transport.go

Jump to

Keyboard shortcuts

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