Documentation ¶
Index ¶
- func Close() error
- func Init(opt *types.ProxyOption) error
- func NewProxyClient(timeout time.Duration, maxIdleConns int, maxIdleConnsPerHost int) *http.Client
- func NewProxyClientFromConfig(config *types.ProxyOption) *http.Client
- func ReverseHandler() gin.HandlerFunc
- type AsyncCallbackRequest
- type AsyncRequest
- type Proxy
- func (p *Proxy) BuildProxyRequest(ori *http.Request, node *rtypes.Node, requestURI string) (*http.Request, error)
- func (p *Proxy) Close() error
- func (p *Proxy) GetRemoteNodeByName(ctx context.Context, funcName string) (*rtypes.Node, error)
- func (p *Proxy) Init(config *types.ProxyOption) error
- func (p *Proxy) ReverseHandler() gin.HandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Init ¶
func Init(opt *types.ProxyOption) error
func NewProxyClient ¶
func NewProxyClientFromConfig ¶
func NewProxyClientFromConfig(config *types.ProxyOption) *http.Client
func ReverseHandler ¶
func ReverseHandler() gin.HandlerFunc
Types ¶
type AsyncCallbackRequest ¶
type AsyncRequest ¶
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
Proxy 代理管理中枢 将会以HTTP服务的形式,反向代理HTTP、Websocket和GRPC请求
func (*Proxy) BuildProxyRequest ¶
func (*Proxy) GetRemoteNodeByName ¶
func (*Proxy) ReverseHandler ¶
func (p *Proxy) ReverseHandler() gin.HandlerFunc
ReverseHandler 反向代理 直接穿透给目标服务器 网络地址格式为: http://host_ip:port/functionName/requestURI...
Click to show internal directories.
Click to hide internal directories.