unidler

package
v3.9.0-alpha.1+incompa... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 30, 2017 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UDPBufferSize  = 4096 // 4KiB should be enough for most whole-packets
	NeedPodsReason = "NeedPods"
)

Variables

View Source
var (
	// MaxHeldConnections is the maximum number of TCP connections per service that
	// will be held by the unidler at once (new connections will cause older ones
	// to be dropped after the limit is reached)
	MaxHeldConnections = 16
)

Functions

func NewUnidlerProxier

func NewUnidlerProxier(loadBalancer userspace.LoadBalancer, listenIP net.IP, iptables iptables.Interface, exec utilexec.Interface, pr utilnet.PortRange, syncPeriod, minSyncPeriod, udpIdleTimeout time.Duration, signaler NeedPodsSignaler) (*userspace.Proxier, error)

NewUnidlerProxier creates a new Proxier for the given LoadBalancer and address which fires off unidling signals connections and traffic. It is intended to be used as one half of a HybridProxier.

Types

type NeedPodsSignaler

type NeedPodsSignaler interface {
	// NeedPods signals that endpoint addresses are needed in order to
	// service a traffic coming to the given service and port
	NeedPods(serviceName types.NamespacedName, port string) error
}

func NewEventSignaler

func NewEventSignaler(eventRecorder record.EventRecorder) NeedPodsSignaler

NewEventSignaler constructs a NeedPodsSignaler which signals by recording an event for the service with the "NeedPods" reason.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL