Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplyFunc ¶
type ApplyFunc = func(tcpProxy *tcp.TcpProxy, destinationRule *networking.DestinationRule, subsetName string)
var Apply ApplyFunc = func(tcpProxy *tcp.TcpProxy, destinationRule *networking.DestinationRule, subsetName string) { var tunnelSettings *networking.TrafficPolicy_TunnelSettings if subsetName != "" { for _, s := range destinationRule.GetSubsets() { if s.Name == subsetName { tunnelSettings = s.GetTrafficPolicy().GetTunnel() break } } } else { tunnelSettings = destinationRule.GetTrafficPolicy().GetTunnel() } if tunnelSettings == nil { return } tcpProxy.TunnelingConfig = &tcp.TcpProxy_TunnelingConfig{ Hostname: net.JoinHostPort(tunnelSettings.GetTargetHost(), strconv.Itoa(int(tunnelSettings.GetTargetPort()))), UsePost: tunnelSettings.Protocol == "POST", } }
Apply configures tunneling_config in a given TcpProxy depending on the destination rule and the destination hosts
var Skip ApplyFunc = func(_ *tcp.TcpProxy, _ *networking.DestinationRule, _ string) {}
Skip has no effect; its only purpose is to avoid passing nil values for ApplyFunc arguments when it is not desired to apply `tunneling_config` to a listener, e.g. AUTO_PASSTHROUGH
Click to show internal directories.
Click to hide internal directories.