types

package
v1.17.0-pre.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IPv4InternalAddress = tables.TestIPv4InternalAddress.AsSlice()
	IPv4NodePortAddress = tables.TestIPv4NodePortAddress.AsSlice()

	IPv6InternalAddress = tables.TestIPv6InternalAddress.AsSlice()
	IPv6NodePortAddress = tables.TestIPv6NodePortAddress.AsSlice()
)

Functions

func NewIPv4OnlyNodeAddressing added in v1.16.0

func NewIPv4OnlyNodeAddressing() types.NodeAddressing

NewIPv4OnlyNodeAddressing returns a new fake node addressing where IPv6 is disabled

func NewIPv6OnlyNodeAddressing added in v1.16.0

func NewIPv6OnlyNodeAddressing() types.NodeAddressing

NewIPv6OnlyNodeAddressing returns a new fake node addressing where IPv4 is disabled

func NewNodeAddressing added in v1.16.0

func NewNodeAddressing() types.NodeAddressing

NewNodeAddressing returns a new fake node addressing

Types

type BandwidthManager added in v1.16.0

type BandwidthManager struct{}

func (*BandwidthManager) BBREnabled added in v1.16.0

func (fbm *BandwidthManager) BBREnabled() bool

func (*BandwidthManager) DeleteBandwidthLimit added in v1.16.0

func (fbm *BandwidthManager) DeleteBandwidthLimit(endpointID uint16)

func (*BandwidthManager) DeleteEndpointBandwidthLimit added in v1.16.0

func (fbm *BandwidthManager) DeleteEndpointBandwidthLimit(epID uint16) error

func (*BandwidthManager) Enabled added in v1.16.0

func (fbm *BandwidthManager) Enabled() bool

func (*BandwidthManager) ResetQueues added in v1.16.0

func (fbm *BandwidthManager) ResetQueues() bool

func (*BandwidthManager) UpdateBandwidthLimit added in v1.16.0

func (fbm *BandwidthManager) UpdateBandwidthLimit(endpointID uint16, bytesPerSecond uint64)

type FakeIptablesManager

type FakeIptablesManager struct {
}

func NewIptablesManager

func NewIptablesManager() *FakeIptablesManager

NewIptablesManager returns a new fake IptablesManager

func (*FakeIptablesManager) GetProxyPorts

func (m *FakeIptablesManager) GetProxyPorts() map[string]uint16

func (*FakeIptablesManager) InstallNoTrackRules

func (m *FakeIptablesManager) InstallNoTrackRules(ip netip.Addr, port uint16)

func (*FakeIptablesManager) InstallProxyRules

func (f *FakeIptablesManager) InstallProxyRules(uint16, string)

func (*FakeIptablesManager) RemoveNoTrackRules

func (m *FakeIptablesManager) RemoveNoTrackRules(ip netip.Addr, port uint16)

func (*FakeIptablesManager) SupportsOriginalSourceAddr

func (f *FakeIptablesManager) SupportsOriginalSourceAddr() bool

type FakeLoader added in v1.16.0

type FakeLoader struct{}

Loader is an interface to abstract out loading of datapath programs.

func (*FakeLoader) CallsMapPath added in v1.16.0

func (f *FakeLoader) CallsMapPath(id uint16) string

func (*FakeLoader) CompileOrLoad added in v1.16.0

func (f *FakeLoader) CompileOrLoad(ctx context.Context, ep datapath.Endpoint, stats *metrics.SpanStat) error

func (*FakeLoader) CustomCallsMapPath added in v1.16.0

func (f *FakeLoader) CustomCallsMapPath(id uint16) string

func (*FakeLoader) DetachXDP added in v1.16.0

func (f *FakeLoader) DetachXDP(ifaceName string, bpffsBase, progName string) error

func (*FakeLoader) EndpointHash added in v1.16.0

func (*FakeLoader) HostDatapathInitialized added in v1.16.0

func (f *FakeLoader) HostDatapathInitialized() <-chan struct{}

func (*FakeLoader) Reinitialize added in v1.16.0

func (f *FakeLoader) Reinitialize(ctx context.Context, cfg *datapath.LocalNodeConfiguration, tunnelConfig tunnel.Config, iptMgr datapath.IptablesManager, p datapath.Proxy) error

Reinitialize does nothing.

func (*FakeLoader) ReinitializeHostDev

func (f *FakeLoader) ReinitializeHostDev(ctx context.Context, mtu int) error

func (*FakeLoader) ReinitializeXDP added in v1.16.0

func (f *FakeLoader) ReinitializeXDP(ctx context.Context, cfg *datapath.LocalNodeConfiguration, extraCArgs []string) error

func (*FakeLoader) ReloadDatapath added in v1.16.0

func (*FakeLoader) Unload added in v1.16.0

func (f *FakeLoader) Unload(ep datapath.Endpoint)

func (*FakeLoader) WriteEndpointConfig added in v1.16.0

type FakeNodeHandler added in v1.16.0

type FakeNodeHandler struct {
	Nodes map[string]nodeTypes.Node
	// contains filtered or unexported fields
}

func NewNodeHandler added in v1.16.0

func NewNodeHandler() *FakeNodeHandler

NewNodeHandler returns a fake NodeHandler that stores the nodes, but performs no other actions.

func (*FakeNodeHandler) AllNodeValidateImplementation added in v1.16.0

func (n *FakeNodeHandler) AllNodeValidateImplementation()

func (*FakeNodeHandler) DeleteMiscNeighbor added in v1.16.0

func (n *FakeNodeHandler) DeleteMiscNeighbor(oldNode *nodeTypes.Node)

func (*FakeNodeHandler) DumpNodeIDs added in v1.16.0

func (n *FakeNodeHandler) DumpNodeIDs() []*models.NodeID

func (*FakeNodeHandler) GetNodeID added in v1.16.0

func (n *FakeNodeHandler) GetNodeID(_ net.IP) (uint16, bool)

func (*FakeNodeHandler) GetNodeIP added in v1.16.0

func (n *FakeNodeHandler) GetNodeIP(_ uint16) string

func (*FakeNodeHandler) InsertMiscNeighbor added in v1.16.0

func (n *FakeNodeHandler) InsertMiscNeighbor(newNode *nodeTypes.Node)

func (*FakeNodeHandler) Name added in v1.16.0

func (n *FakeNodeHandler) Name() string

func (*FakeNodeHandler) NodeAdd added in v1.16.0

func (n *FakeNodeHandler) NodeAdd(newNode nodeTypes.Node) error

func (*FakeNodeHandler) NodeCleanNeighbors added in v1.16.0

func (n *FakeNodeHandler) NodeCleanNeighbors(migrateOnly bool)

func (*FakeNodeHandler) NodeConfigurationChanged added in v1.16.0

func (n *FakeNodeHandler) NodeConfigurationChanged(config datapath.LocalNodeConfiguration) error

func (*FakeNodeHandler) NodeDelete added in v1.16.0

func (n *FakeNodeHandler) NodeDelete(node nodeTypes.Node) error

func (*FakeNodeHandler) NodeNeighDiscoveryEnabled added in v1.16.0

func (n *FakeNodeHandler) NodeNeighDiscoveryEnabled() bool

func (*FakeNodeHandler) NodeNeighborRefresh added in v1.16.0

func (n *FakeNodeHandler) NodeNeighborRefresh(ctx context.Context, node nodeTypes.Node, refresh bool) error

func (*FakeNodeHandler) NodeUpdate added in v1.16.0

func (n *FakeNodeHandler) NodeUpdate(oldNode, newNode nodeTypes.Node) error

func (*FakeNodeHandler) NodeValidateImplementation added in v1.16.0

func (n *FakeNodeHandler) NodeValidateImplementation(node nodeTypes.Node) error

func (*FakeNodeHandler) RestoreNodeIDs added in v1.16.0

func (n *FakeNodeHandler) RestoreNodeIDs()

type FakeOrchestrator added in v1.16.0

type FakeOrchestrator struct{}

func (*FakeOrchestrator) EndpointHash

func (*FakeOrchestrator) Reinitialize added in v1.16.0

func (f *FakeOrchestrator) Reinitialize(ctx context.Context) error

func (*FakeOrchestrator) ReinitializeXDP

func (f *FakeOrchestrator) ReinitializeXDP(ctx context.Context, extraCArgs []string) error

func (*FakeOrchestrator) ReloadDatapath

func (f *FakeOrchestrator) ReloadDatapath(ctx context.Context, ep datapath.Endpoint, stats *metrics.SpanStat) (string, error)

func (*FakeOrchestrator) Unload

func (f *FakeOrchestrator) Unload(ep datapath.Endpoint)

func (*FakeOrchestrator) WriteEndpointConfig

func (f *FakeOrchestrator) WriteEndpointConfig(w io.Writer, cfg datapath.EndpointConfiguration) error

type IPSet added in v1.16.0

type IPSet struct{}

func (*IPSet) AddToIPSet added in v1.16.0

func (f *IPSet) AddToIPSet(_ string, _ ipset.Family, _ ...netip.Addr)

func (*IPSet) NewInitializer added in v1.16.0

func (f *IPSet) NewInitializer() ipset.Initializer

func (*IPSet) RemoveFromIPSet added in v1.16.0

func (f *IPSet) RemoveFromIPSet(name string, addrs ...netip.Addr)

type MTU added in v1.16.0

type MTU struct{}

func (*MTU) GetDeviceMTU added in v1.16.0

func (*MTU) GetDeviceMTU() int

GetDeviceMTU implements mtu.MTU.

func (*MTU) GetRouteMTU added in v1.16.0

func (*MTU) GetRouteMTU() int

GetRouteMTU implements mtu.MTU.

func (*MTU) GetRoutePostEncryptMTU added in v1.16.0

func (*MTU) GetRoutePostEncryptMTU() int

GetRoutePostEncryptMTU implements mtu.MTU.

func (*MTU) IsEnableRouteMTUForCNIChaining added in v1.16.0

func (*MTU) IsEnableRouteMTUForCNIChaining() bool

Jump to

Keyboard shortcuts

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