Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ShouldUseIptablesProxier ¶
ShouldUseIptablesProxier returns true if we should use the iptables Proxier instead of the "classic" userspace Proxier. This is determined by checking the iptables version and for the existence of kernel features. It may return an error if it fails to get the itpables version without error, in which case it will also return false.
Types ¶
type Proxier ¶
type Proxier struct {
// contains filtered or unexported fields
}
Proxier is an iptables based proxy for connections between a localhost:lport and services that provide the actual backends.
func NewProxier ¶
func NewProxier(ipt utiliptables.Interface, exec utilexec.Interface, syncPeriod time.Duration) (*Proxier, error)
NewProxier returns a new Proxier given an iptables Interface instance. Because of the iptables logic, it is assumed that there is only a single Proxier active on a machine. An error will be returned if iptables fails to update or acquire the initial lock. Once a proxier is created, it will keep iptables up to date in the background and will not terminate if a particular iptables call fails.
func (*Proxier) OnEndpointsUpdate ¶
OnEndpointsUpdate takes in a slice of updated endpoints.
func (*Proxier) OnServiceUpdate ¶
OnServiceUpdate tracks the active set of service proxies. They will be synchronized using syncProxyRules()