Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGrpcLoadBalanceHandler ¶
func NewGrpcLoadBalanceHandler(lb loadbalance.LoadBalance) grpc.StreamHandler
NewGrpcLoadBalanceHandler 创建 Grpc 负载均衡代理 Handler
func NewLoadBalanceReverseProxy ¶
func NewLoadBalanceReverseProxy(c *gin.Context, lb loadbalance.LoadBalance, transport *http.Transport) *httputil.ReverseProxy
NewLoadBalanceReverseProxy 创建负载均衡反向代理器
Types ¶
type TCPReverseProxy ¶
type TCPReverseProxy struct { Addr string KeepAlivePeriod time.Duration // 长连接设置 DialTimeout time.Duration // 拨号超时时间 // 拨号的上下文 DialContext func(ctx context.Context, network, address string) (net.Conn, error) // 拨号的错误 OnDialError func(src net.Conn, dstDialErr error) ProxyProtocolVersion int // contains filtered or unexported fields }
TCPReverseProxy TCP 反向代理配置
func NewTCPLoadBalanceReverseProxy ¶
func NewTCPLoadBalanceReverseProxy(c *tcp_proxy_middleware.TCPSliceRouterContext, lb loadbalance.LoadBalance) *TCPReverseProxy
NewTCPLoadBalanceReverseProxy 创建TCP代理负载均衡器
Source Files ¶
Click to show internal directories.
Click to hide internal directories.