Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGrpcLoadBalanceHandler ¶
func NewGrpcLoadBalanceHandler(lb load_balance.LoadBalance) grpc.StreamHandler
func NewLoadBalanceReverseProxy ¶
func NewLoadBalanceReverseProxy(c *gin.Context, lb load_balance.LoadBalance, trans *http.Transport) *httputil.ReverseProxy
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 load_balance.LoadBalance) *TcpReverseProxy
Click to show internal directories.
Click to hide internal directories.