proxy

package
v0.0.0-alpha.0....-18a57d7 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: Apache-2.0 Imports: 22 Imported by: 1

Documentation

Overview

Package proxy contains the OpenShift SDN code that runs as part of the service proxy

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EndpointsHandler

type EndpointsHandler interface {
	OnEndpointsAdd(endpoints *corev1.Endpoints)
	OnEndpointsUpdate(oldEndpoints, endpoints *corev1.Endpoints)
	OnEndpointsDelete(endpoints *corev1.Endpoints)
	OnEndpointsSynced()
}

Legacy config.EndpointHandler interface

type HybridProxier

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

HybridProxier runs an unidling proxy and a primary proxy at the same time, delegating idled services to the unidling proxy and other services to the primary proxy.

func NewHybridProxier

func NewHybridProxier(
	mainProxy HybridizableProxy,
	unidlingProxy HybridizableProxy,
	minSyncPeriod time.Duration,
	serviceLister corev1listers.ServiceLister,
) *HybridProxier

func (*HybridProxier) OnEndpointSliceAdd

func (p *HybridProxier) OnEndpointSliceAdd(slice *discoveryv1.EndpointSlice)

func (*HybridProxier) OnEndpointSliceDelete

func (p *HybridProxier) OnEndpointSliceDelete(slice *discoveryv1.EndpointSlice)

func (*HybridProxier) OnEndpointSliceUpdate

func (p *HybridProxier) OnEndpointSliceUpdate(oldSlice, slice *discoveryv1.EndpointSlice)

func (*HybridProxier) OnEndpointSlicesSynced

func (p *HybridProxier) OnEndpointSlicesSynced()

func (*HybridProxier) OnEndpointsAdd

func (p *HybridProxier) OnEndpointsAdd(endpoints *corev1.Endpoints)

func (*HybridProxier) OnEndpointsDelete

func (p *HybridProxier) OnEndpointsDelete(endpoints *corev1.Endpoints)

func (*HybridProxier) OnEndpointsSynced

func (p *HybridProxier) OnEndpointsSynced()

func (*HybridProxier) OnEndpointsUpdate

func (p *HybridProxier) OnEndpointsUpdate(oldEndpoints, endpoints *corev1.Endpoints)

func (*HybridProxier) OnNodeAdd

func (proxier *HybridProxier) OnNodeAdd(node *corev1.Node)

func (*HybridProxier) OnNodeDelete

func (proxier *HybridProxier) OnNodeDelete(node *corev1.Node)

func (*HybridProxier) OnNodeSynced

func (proxier *HybridProxier) OnNodeSynced()

func (*HybridProxier) OnNodeUpdate

func (proxier *HybridProxier) OnNodeUpdate(oldNode, node *corev1.Node)

func (*HybridProxier) OnServiceAdd

func (p *HybridProxier) OnServiceAdd(service *corev1.Service)

func (*HybridProxier) OnServiceDelete

func (p *HybridProxier) OnServiceDelete(service *corev1.Service)

func (*HybridProxier) OnServiceSynced

func (p *HybridProxier) OnServiceSynced()

func (*HybridProxier) OnServiceUpdate

func (p *HybridProxier) OnServiceUpdate(oldService, service *corev1.Service)

func (*HybridProxier) ReloadIPTables

func (p *HybridProxier) ReloadIPTables()

func (*HybridProxier) SetSyncRunner

func (p *HybridProxier) SetSyncRunner(b *async.BoundedFrequencyRunner)

func (*HybridProxier) Sync

func (p *HybridProxier) Sync()

Sync is called to synchronize the proxier state to iptables this doesn't take immediate effect - rather, it requests that the BoundedFrequencyRunner call syncProxyRules()

func (*HybridProxier) SyncLoop

func (p *HybridProxier) 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.

func (*HybridProxier) SyncProxyRules

func (p *HybridProxier) SyncProxyRules()

type HybridizableProxy

type HybridizableProxy interface {
	proxy.Provider

	SyncProxyRules()
	SetSyncRunner(b *async.BoundedFrequencyRunner)

	ReloadIPTables()
}

HybridizableProxy is an extra interface we layer on top of Provider

type OsdnProxy

type OsdnProxy struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func New

func New(kClient kubernetes.Interface,
	kubeInformers informers.SharedInformerFactory,
	osdnClient osdnclient.Interface,
	osdnInformers osdninformers.SharedInformerFactory,
	minSyncPeriod time.Duration) (*OsdnProxy, error)

Called by higher layers to create the proxy plugin instance

func (*OsdnProxy) OnEndpointSliceAdd

func (proxy *OsdnProxy) OnEndpointSliceAdd(slice *discoveryv1.EndpointSlice)

func (*OsdnProxy) OnEndpointSliceDelete

func (proxy *OsdnProxy) OnEndpointSliceDelete(slice *discoveryv1.EndpointSlice)

func (*OsdnProxy) OnEndpointSliceUpdate

func (proxy *OsdnProxy) OnEndpointSliceUpdate(old, slice *discoveryv1.EndpointSlice)

func (*OsdnProxy) OnEndpointSlicesSynced

func (proxy *OsdnProxy) OnEndpointSlicesSynced()

func (*OsdnProxy) OnEndpointsAdd

func (proxy *OsdnProxy) OnEndpointsAdd(ep *corev1.Endpoints)

func (*OsdnProxy) OnEndpointsDelete

func (proxy *OsdnProxy) OnEndpointsDelete(ep *corev1.Endpoints)

func (*OsdnProxy) OnEndpointsSynced

func (proxy *OsdnProxy) OnEndpointsSynced()

func (*OsdnProxy) OnEndpointsUpdate

func (proxy *OsdnProxy) OnEndpointsUpdate(old, ep *corev1.Endpoints)

func (*OsdnProxy) OnNodeAdd

func (proxier *OsdnProxy) OnNodeAdd(node *corev1.Node)

func (*OsdnProxy) OnNodeDelete

func (proxier *OsdnProxy) OnNodeDelete(node *corev1.Node)

func (*OsdnProxy) OnNodeSynced

func (proxier *OsdnProxy) OnNodeSynced()

func (*OsdnProxy) OnNodeUpdate

func (proxier *OsdnProxy) OnNodeUpdate(oldNode, node *corev1.Node)

func (*OsdnProxy) OnServiceAdd

func (proxy *OsdnProxy) OnServiceAdd(service *corev1.Service)

func (*OsdnProxy) OnServiceDelete

func (proxy *OsdnProxy) OnServiceDelete(service *corev1.Service)

func (*OsdnProxy) OnServiceSynced

func (proxy *OsdnProxy) OnServiceSynced()

func (*OsdnProxy) OnServiceUpdate

func (proxy *OsdnProxy) OnServiceUpdate(oldService, service *corev1.Service)

func (*OsdnProxy) ReloadIPTables

func (proxy *OsdnProxy) ReloadIPTables() error

func (*OsdnProxy) SetBaseProxies

func (proxy *OsdnProxy) SetBaseProxies(mainProxy, unidlingProxy HybridizableProxy)

func (*OsdnProxy) Start

func (proxy *OsdnProxy) Start(waitChan chan<- bool) error

func (*OsdnProxy) Sync

func (proxy *OsdnProxy) Sync()

func (*OsdnProxy) SyncLoop

func (proxy *OsdnProxy) SyncLoop()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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