ipwatcher

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2025 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Package ipwatcher watches the IP and port changes of pods, services and endpointslices

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Transform

func Transform(obj interface{}) (interface{}, error)

Types

type IPPortCache

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

func (*IPPortCache) CleanupStaleEntries

func (c *IPPortCache) CleanupStaleEntries(svcLister corelisters.ServiceLister, epsLister discoverylisters.EndpointSliceLister) error

func (*IPPortCache) Delete

func (c *IPPortCache) Delete(uid string)

func (*IPPortCache) Get

func (c *IPPortCache) Get(uid string) (ipPort, bool)

func (*IPPortCache) GetAllEntries

func (c *IPPortCache) GetAllEntries() map[string]ipPort

func (*IPPortCache) SyncCache

func (*IPPortCache) Update

func (c *IPPortCache) Update(uid string, i ipPort)

type IPWatcher

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

func NewIPWatcher

func NewIPWatcher(
	varmorInterface varmorinterface.CrdV1beta1Interface,
	podinformer coreinformers.PodInformer,
	serviceinformer coreinformers.ServiceInformer,
	epsinformer discoveryinformers.EndpointSliceInformer,
	egressCache map[string]varmortypes.EgressInfo,
	egressCacheMutex *sync.RWMutex,
	log logr.Logger,
) (*IPWatcher, error)

func (*IPWatcher) Run

func (i *IPWatcher) Run(workers int, stopCh <-chan struct{})

type SlimObject

type SlimObject struct {
	metav1.TypeMeta
	metav1.ObjectMeta
	EventType  string
	IPs        []string
	AddedIPs   []string
	DeletedIPs []string
	Ports      []varmor.Port
}

Jump to

Keyboard shortcuts

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