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
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)