proxy

package
v1.24.5 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AgentModeApiServer = "apiServerProxy"
	AgentModeAHTTP     = "http"
	AgentModeHTTPS     = "https"
)

Variables

This section is empty.

Functions

func ParseProxyObj

func ParseProxyObj(c *gin.Context, path string) *audit.ProxyObject

func Transport

func Transport(local, proxy *websocket.Conn, c *gin.Context, user models.CommonUserIface, auditFunc func(string))

Types

type Msg

type Msg struct {
	MsgType int
	Content []byte
}

type ProxyHandler

type ProxyHandler struct {
	base.BaseHandler
}

func (*ProxyHandler) Proxy

func (h *ProxyHandler) Proxy(c *gin.Context)

不需要swagger

func (*ProxyHandler) ProxyHTTP

func (h *ProxyHandler) ProxyHTTP(c *gin.Context)

func (*ProxyHandler) ProxyService

func (h *ProxyHandler) ProxyService(c *gin.Context)

func (*ProxyHandler) ProxyWebsocket

func (h *ProxyHandler) ProxyWebsocket(c *gin.Context)

type ProxyObject

type ProxyObject struct {
	NamespacedScoped bool
	Cluster          string
	Namespace        string
	Name             string
	Group            string
	Version          string
	Resource         string
	Action           string
}

func (*ProxyObject) InNamespace

func (p *ProxyObject) InNamespace() bool

type WebSocketProxy

type WebSocketProxy struct {
	RequestContext *gin.Context
	Source         *websocket.Conn
	Target         *websocket.Conn
	SourceChan     chan Msg
	TargetChan     chan Msg
	Done           chan bool
	Username       string
	AuditFunc      func(string)
	// contains filtered or unexported fields
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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