kubernetes: k8s.io/kubernetes/pkg/proxy/winuserspace Index | Files

package winuserspace

import "k8s.io/kubernetes/pkg/proxy/winuserspace"

Index

Package Files

loadbalancer.go proxier.go proxysocket.go roundrobin.go types.go

Variables

var (
    ErrMissingServiceEntry = errors.New("missing service entry")
    ErrMissingEndpoints    = errors.New("missing endpoints")
)
var (
    // ErrProxyOnLocalhost is returned by NewProxier if the user requests a proxier on
    // the loopback address. May be checked for by callers of NewProxier to know whether
    // the caller provided invalid input.
    ErrProxyOnLocalhost = fmt.Errorf("cannot proxy on localhost")
)

type LoadBalancer Uses

type LoadBalancer interface {
    // NextEndpoint returns the endpoint to handle a request for the given
    // service-port and source address.
    NextEndpoint(service proxy.ServicePortName, srcAddr net.Addr, sessionAffinityReset bool) (string, error)
    NewService(service proxy.ServicePortName, sessionAffinityType v1.ServiceAffinity, stickyMaxAgeMinutes int) error
    DeleteService(service proxy.ServicePortName)
    CleanupStaleStickySessions(service proxy.ServicePortName)

    proxyconfig.EndpointsHandler
}

LoadBalancer is an interface for distributing incoming requests to service endpoints.

type LoadBalancerRR Uses

type LoadBalancerRR struct {
    // contains filtered or unexported fields
}

LoadBalancerRR is a round-robin load balancer.

func NewLoadBalancerRR Uses

func NewLoadBalancerRR() *LoadBalancerRR

NewLoadBalancerRR returns a new LoadBalancerRR.

func (*LoadBalancerRR) CleanupStaleStickySessions Uses

func (lb *LoadBalancerRR) CleanupStaleStickySessions(svcPort proxy.ServicePortName)

func (*LoadBalancerRR) DeleteService Uses

func (lb *LoadBalancerRR) DeleteService(svcPort proxy.ServicePortName)

func (*LoadBalancerRR) NewService Uses

func (lb *LoadBalancerRR) NewService(svcPort proxy.ServicePortName, affinityType v1.ServiceAffinity, ttlSeconds int) error

func (*LoadBalancerRR) NextEndpoint Uses

func (lb *LoadBalancerRR) NextEndpoint(svcPort proxy.ServicePortName, srcAddr net.Addr, sessionAffinityReset bool) (string, error)

NextEndpoint returns a service endpoint. The service endpoint is chosen using the round-robin algorithm.

func (*LoadBalancerRR) OnEndpointsAdd Uses

func (lb *LoadBalancerRR) OnEndpointsAdd(endpoints *v1.Endpoints)

func (*LoadBalancerRR) OnEndpointsDelete Uses

func (lb *LoadBalancerRR) OnEndpointsDelete(endpoints *v1.Endpoints)

func (*LoadBalancerRR) OnEndpointsSynced Uses

func (lb *LoadBalancerRR) OnEndpointsSynced()

func (*LoadBalancerRR) OnEndpointsUpdate Uses

func (lb *LoadBalancerRR) OnEndpointsUpdate(oldEndpoints, endpoints *v1.Endpoints)

type Proxier Uses

type Proxier struct {
    // EndpointSlice support has not been added for this proxier yet.
    config.NoopEndpointSliceHandler
    // contains filtered or unexported fields
}

Proxier is a simple proxy for TCP connections between a localhost:lport and services that provide the actual implementations.

func NewProxier Uses

func NewProxier(loadBalancer LoadBalancer, listenIP net.IP, netsh netsh.Interface, pr utilnet.PortRange, syncPeriod, udpIdleTimeout time.Duration) (*Proxier, error)

NewProxier returns a new Proxier given a LoadBalancer and an address on which to listen. It is assumed that there is only a single Proxier active on a machine. An error will be returned if the proxier cannot be started due to an invalid ListenIP (loopback)

func (*Proxier) OnEndpointsAdd Uses

func (proxier *Proxier) OnEndpointsAdd(endpoints *v1.Endpoints)

func (*Proxier) OnEndpointsDelete Uses

func (proxier *Proxier) OnEndpointsDelete(endpoints *v1.Endpoints)

func (*Proxier) OnEndpointsSynced Uses

func (proxier *Proxier) OnEndpointsSynced()

func (*Proxier) OnEndpointsUpdate Uses

func (proxier *Proxier) OnEndpointsUpdate(oldEndpoints, endpoints *v1.Endpoints)

func (*Proxier) OnServiceAdd Uses

func (proxier *Proxier) OnServiceAdd(service *v1.Service)

func (*Proxier) OnServiceDelete Uses

func (proxier *Proxier) OnServiceDelete(service *v1.Service)

func (*Proxier) OnServiceSynced Uses

func (proxier *Proxier) OnServiceSynced()

func (*Proxier) OnServiceUpdate Uses

func (proxier *Proxier) OnServiceUpdate(oldService, service *v1.Service)

func (*Proxier) Sync Uses

func (proxier *Proxier) Sync()

Sync is called to immediately synchronize the proxier state

func (*Proxier) SyncLoop Uses

func (proxier *Proxier) SyncLoop()

SyncLoop runs periodic work. This is expected to run as a goroutine or as the main loop of the app. It does not return.

type ServicePortPortalName Uses

type ServicePortPortalName struct {
    types.NamespacedName
    Port         string
    PortalIPName string
}

ServicePortPortalName carries a namespace + name + portname + portalip. This is the unique identifier for a windows service port portal.

func (ServicePortPortalName) String Uses

func (spn ServicePortPortalName) String() string

Package winuserspace imports 24 packages (graph) and is imported by 2 packages. Updated 2019-09-17. Refresh now. Tools for package owners.