conntrack

package
v1.32.0-alpha.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanStaleEntries

func CleanStaleEntries(ct Interface, ipFamily v1.IPFamily, svcPortMap proxy.ServicePortMap,
	serviceUpdateResult proxy.UpdateServiceMapResult, endpointsUpdateResult proxy.UpdateEndpointsMapResult)

CleanStaleEntries takes care of flushing stale conntrack entries for services and endpoints.

Types

type FakeInterface added in v1.30.0

type FakeInterface struct {
	ClearedIPs      sets.Set[string]
	ClearedPorts    sets.Set[int]
	ClearedNATs     map[string]string // origin -> dest
	ClearedPortNATs map[int]string    // port -> dest
}

FakeInterface implements Interface by just recording entries that have been cleared.

func NewFake added in v1.30.0

func NewFake() *FakeInterface

NewFake creates a new FakeInterface

func (*FakeInterface) ClearEntries added in v1.32.0

func (fake *FakeInterface) ClearEntries(_ uint8, filters ...netlink.CustomConntrackFilter) error

ClearEntries is part of Interface

func (*FakeInterface) Reset added in v1.30.0

func (fake *FakeInterface) Reset()

Reset clears fake's sets/maps

type Interface added in v1.30.0

type Interface interface {
	// ClearEntries deletes conntrack entries for connections of the given IP family,
	// filtered by the given filters.
	ClearEntries(ipFamily uint8, filters ...netlink.CustomConntrackFilter) error
}

Interface for dealing with conntrack

func New added in v1.32.0

func New() Interface

Jump to

Keyboard shortcuts

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