proxy

package
v0.0.0-...-f647662 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: Zlib Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AgentHTTPRequest

func AgentHTTPRequest(rw http.ResponseWriter, request *http.Request, target *agent.ClusterMember, useTLS bool)

AgentHTTPRequest redirects a HTTP request to another agent.

func NewKubernetesProxy

func NewKubernetesProxy() *httputil.ReverseProxy

func WebsocketRequest

func WebsocketRequest(rw http.ResponseWriter, request *http.Request, target *agent.ClusterMember)

WebsocketRequest redirects a websocket request to another agent.

Types

type AgentProxy

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

AgentProxy enables redirection to different nodes

func NewAgentProxy

func NewAgentProxy(clusterService agent.ClusterService, config *agent.RuntimeConfig, useTLS bool) *AgentProxy

NewAgentProxy returns a pointer to a new AgentProxy object

func (*AgentProxy) Redirect

func (p *AgentProxy) Redirect(next http.Handler) http.Handler

Redirect is redirecting request to the specific agent node

type ClusterProxy

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

ClusterProxy is a service used to execute the same requests on multiple targets.

func NewClusterProxy

func NewClusterProxy(useTLS bool) *ClusterProxy

NewClusterProxy returns a pointer to a ClusterProxy. It also sets the default values used in the underlying http.Client.

func (*ClusterProxy) ClusterOperation

func (clusterProxy *ClusterProxy) ClusterOperation(request *http.Request, clusterMembers []agent.ClusterMember) (any, error)

ClusterOperation will copy and execute the specified request on a set of agents. It aggregates the data of each request's response in a single response object.

type LocalProxy

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

LocalProxy is a service used to proxy requests to a Unix socket (Linux) or named pipe (Windows). The proxy operation implementation is defined in the ServeHTTP function.

func NewLocalProxy

func NewLocalProxy() *LocalProxy

NewLocalProxy returns a pointer to a LocalProxy.

func (*LocalProxy) ServeHTTP

func (proxy *LocalProxy) ServeHTTP(rw http.ResponseWriter, request *http.Request)

Jump to

Keyboard shortcuts

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