Versions in this module Expand all Collapse all v1 v1.16.3 Oct 23, 2019 Changes in this version + var EndpointDialTimeouts = []time.Duration + var ErrMissingEndpoints = errors.New("missing endpoints") + var ErrMissingServiceEntry = errors.New("missing service entry") + var ErrProxyOnLocalhost = fmt.Errorf("cannot proxy on localhost") + func CleanupLeftovers(ipt iptables.Interface) (encounteredError bool) + func ProxyTCP(in, out *net.TCPConn) + func TryConnectEndpoints(service proxy.ServicePortName, srcAddr net.Addr, protocol string, ...) (out net.Conn, err error) + type ClientCache struct + Clients map[string]net.Conn + Mu sync.Mutex + type LoadBalancer interface + CleanupStaleStickySessions func(service proxy.ServicePortName) + DeleteService func(service proxy.ServicePortName) + NewService func(service proxy.ServicePortName, sessionAffinityType v1.ServiceAffinity, ...) error + NextEndpoint func(service proxy.ServicePortName, srcAddr net.Addr, sessionAffinityReset bool) (string, error) + ServiceHasEndpoints func(service proxy.ServicePortName) bool + type LoadBalancerRR struct + func NewLoadBalancerRR() *LoadBalancerRR + func (lb *LoadBalancerRR) CleanupStaleStickySessions(svcPort proxy.ServicePortName) + func (lb *LoadBalancerRR) DeleteService(svcPort proxy.ServicePortName) + func (lb *LoadBalancerRR) NewService(svcPort proxy.ServicePortName, affinityType v1.ServiceAffinity, ttlSeconds int) error + func (lb *LoadBalancerRR) NextEndpoint(svcPort proxy.ServicePortName, srcAddr net.Addr, sessionAffinityReset bool) (string, error) + func (lb *LoadBalancerRR) OnEndpointsAdd(endpoints *v1.Endpoints) + func (lb *LoadBalancerRR) OnEndpointsDelete(endpoints *v1.Endpoints) + func (lb *LoadBalancerRR) OnEndpointsSynced() + func (lb *LoadBalancerRR) OnEndpointsUpdate(oldEndpoints, endpoints *v1.Endpoints) + func (lb *LoadBalancerRR) ServiceHasEndpoints(svcPort proxy.ServicePortName) bool + type PortAllocator interface + AllocateNext func() (int, error) + Release func(int) + type Proxier struct + func NewCustomProxier(loadBalancer LoadBalancer, listenIP net.IP, iptables iptables.Interface, ...) (*Proxier, error) + func NewProxier(loadBalancer LoadBalancer, listenIP net.IP, iptables iptables.Interface, ...) (*Proxier, error) + func (proxier *Proxier) OnEndpointsAdd(endpoints *v1.Endpoints) + func (proxier *Proxier) OnEndpointsDelete(endpoints *v1.Endpoints) + func (proxier *Proxier) OnEndpointsSynced() + func (proxier *Proxier) OnEndpointsUpdate(oldEndpoints, endpoints *v1.Endpoints) + func (proxier *Proxier) OnServiceAdd(service *v1.Service) + func (proxier *Proxier) OnServiceDelete(service *v1.Service) + func (proxier *Proxier) OnServiceSynced() + func (proxier *Proxier) OnServiceUpdate(oldService, service *v1.Service) + func (proxier *Proxier) Sync() + func (proxier *Proxier) SyncLoop() + type ProxySocket interface + Addr func() net.Addr + Close func() error + ListenPort func() int + ProxyLoop func(service proxy.ServicePortName, info *ServiceInfo, loadBalancer LoadBalancer) + type ProxySocketFunc func(protocol v1.Protocol, ip net.IP, port int) (ProxySocket, error) + type ServiceInfo struct + ActiveClients *ClientCache + Timeout time.Duration + func (info *ServiceInfo) IsAlive() bool