proxy

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultProxyRequestHeaderPrefix = "X-Clusterpedia-Proxy-"

Variables

This section is empty.

Functions

func NewRemoteProxyREST

func NewRemoteProxyREST(serializer runtime.NegotiatedSerializer, connGetter ClusterConnectionGetter) http.Handler

Types

type ClusterConnectionGetter

type ClusterConnectionGetter interface {
	GetClusterConnection(ctx context.Context, cluster string, req *http.Request) (string, http.RoundTripper, error)
}

func NewProxyConnector

func NewProxyConnector(clusterLister clusterlister.PediaClusterLister, secretLister corev1listers.SecretNamespaceLister, allowPediaClusterConfigReuse bool, extraHeaderPrefixes []string) ClusterConnectionGetter

type Connector

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

func (*Connector) GetClusterConnection

func (c *Connector) GetClusterConnection(ctx context.Context, name string, req *http.Request) (string, http.RoundTripper, error)

type PodSubresourceRemoteProxyREST

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

func GetSubresourceRESTs

func GetSubresourceRESTs(connGetter ClusterConnectionGetter) []*PodSubresourceRemoteProxyREST

func (*PodSubresourceRemoteProxyREST) Connect

func (r *PodSubresourceRemoteProxyREST) Connect(ctx context.Context, name string, opts runtime.Object, responder rest.Responder) (http.Handler, error)

func (*PodSubresourceRemoteProxyREST) ConnectMethods

func (r *PodSubresourceRemoteProxyREST) ConnectMethods() []string

func (*PodSubresourceRemoteProxyREST) Destroy

func (r *PodSubresourceRemoteProxyREST) Destroy()

func (*PodSubresourceRemoteProxyREST) Namespaced

func (r *PodSubresourceRemoteProxyREST) Namespaced() bool

func (*PodSubresourceRemoteProxyREST) New

func (*PodSubresourceRemoteProxyREST) NewConnectOptions

func (r *PodSubresourceRemoteProxyREST) NewConnectOptions() (runtime.Object, bool, string)

func (*PodSubresourceRemoteProxyREST) ParentGroupResource

func (r *PodSubresourceRemoteProxyREST) ParentGroupResource() schema.GroupResource

func (*PodSubresourceRemoteProxyREST) ParentKind

func (r *PodSubresourceRemoteProxyREST) ParentKind() string

func (*PodSubresourceRemoteProxyREST) Subresource

func (r *PodSubresourceRemoteProxyREST) Subresource() string

type RemoteProxyREST

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

func (*RemoteProxyREST) Error

func (r *RemoteProxyREST) Error(w http.ResponseWriter, req *http.Request, err error)

func (*RemoteProxyREST) ServeHTTP

func (r *RemoteProxyREST) ServeHTTP(rw http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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