Documentation ¶
Index ¶
- func CleanStaleEntries(ct Interface, svcPortMap proxy.ServicePortMap, ...)
- type FakeInterface
- func (fake *FakeInterface) ClearEntriesForIP(ip string, protocol v1.Protocol) error
- func (fake *FakeInterface) ClearEntriesForNAT(origin, dest string, protocol v1.Protocol) error
- func (fake *FakeInterface) ClearEntriesForPort(port int, isIPv6 bool, protocol v1.Protocol) error
- func (fake *FakeInterface) ClearEntriesForPortNAT(dest string, port int, protocol v1.Protocol) error
- func (fake *FakeInterface) Reset()
- type Interface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanStaleEntries ¶
func CleanStaleEntries(ct Interface, 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 (*FakeInterface) ClearEntriesForIP ¶ added in v1.30.0
func (fake *FakeInterface) ClearEntriesForIP(ip string, protocol v1.Protocol) error
ClearEntriesForIP is part of Interface
func (*FakeInterface) ClearEntriesForNAT ¶ added in v1.30.0
func (fake *FakeInterface) ClearEntriesForNAT(origin, dest string, protocol v1.Protocol) error
ClearEntriesForNAT is part of Interface
func (*FakeInterface) ClearEntriesForPort ¶ added in v1.30.0
ClearEntriesForPort is part of Interface
func (*FakeInterface) ClearEntriesForPortNAT ¶ added in v1.30.0
func (fake *FakeInterface) ClearEntriesForPortNAT(dest string, port int, protocol v1.Protocol) error
ClearEntriesForPortNAT 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 { // ClearEntriesForIP deletes conntrack entries for connections of the given // protocol, to the given IP. ClearEntriesForIP(ip string, protocol v1.Protocol) error // ClearEntriesForPort deletes conntrack entries for connections of the given // protocol and IP family, to the given port. ClearEntriesForPort(port int, isIPv6 bool, protocol v1.Protocol) error // ClearEntriesForNAT deletes conntrack entries for connections of the given // protocol, which had been DNATted from origin to dest. ClearEntriesForNAT(origin, dest string, protocol v1.Protocol) error // ClearEntriesForPortNAT deletes conntrack entries for connections of the given // protocol, which had been DNATted from the given port (on any IP) to dest. ClearEntriesForPortNAT(dest string, port int, protocol v1.Protocol) error }
Interface for dealing with conntrack
Click to show internal directories.
Click to hide internal directories.