types

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: Apache-2.0 Imports: 16 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 FakeDatapath added in v1.16.0

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

func NewDatapath added in v1.16.0

func NewDatapath() *FakeDatapath

NewDatapath returns a new fake datapath

func NewDatapathWithNodeAddressing added in v1.16.0

func NewDatapathWithNodeAddressing(na datapath.NodeAddressing) *FakeDatapath

func (*FakeDatapath) BandwidthManager added in v1.16.0

func (f *FakeDatapath) BandwidthManager() datapath.BandwidthManager

func (*FakeDatapath) FakeNode added in v1.16.0

func (f *FakeDatapath) FakeNode() *FakeNodeHandler

func (*FakeDatapath) GetProxyPorts added in v1.16.0

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

func (*FakeDatapath) InstallNoTrackRules added in v1.16.0

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

func (*FakeDatapath) InstallProxyRules added in v1.16.0

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

func (*FakeDatapath) LBMap added in v1.16.0

func (f *FakeDatapath) LBMap() datapath.LBMap

func (*FakeDatapath) LBMockMap added in v1.16.0

func (f *FakeDatapath) LBMockMap() *mockmaps.LBMockMap

func (*FakeDatapath) Loader added in v1.16.0

func (f *FakeDatapath) Loader() datapath.Loader

func (*FakeDatapath) LocalNodeAddressing added in v1.16.0

func (f *FakeDatapath) LocalNodeAddressing() datapath.NodeAddressing

LocalNodeAddressing returns a fake node addressing implementation of the local node

func (*FakeDatapath) Node added in v1.16.0

func (f *FakeDatapath) Node() datapath.NodeHandler

Node returns a fake handler for node events

func (*FakeDatapath) NodeIDs added in v1.16.0

func (f *FakeDatapath) NodeIDs() datapath.NodeIDHandler

func (*FakeDatapath) NodeNeighbors added in v1.16.0

func (f *FakeDatapath) NodeNeighbors() datapath.NodeNeighbors

func (*FakeDatapath) Orchestrator added in v1.16.0

func (f *FakeDatapath) Orchestrator() datapath.Orchestrator

func (*FakeDatapath) RemoveNoTrackRules added in v1.16.0

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

func (*FakeDatapath) SupportsOriginalSourceAddr added in v1.16.0

func (f *FakeDatapath) SupportsOriginalSourceAddr() bool

func (*FakeDatapath) WireguardAgent added in v1.16.0

func (f *FakeDatapath) WireguardAgent() datapath.WireguardAgent

func (*FakeDatapath) WriteEndpointConfig added in v1.16.0

WriteEndpointConfig pretends to write the endpoint configuration to a writer.

func (*FakeDatapath) WriteNetdevConfig added in v1.16.0

func (f *FakeDatapath) WriteNetdevConfig(io.Writer, *option.IntOptions) error

WriteNetdevConfig pretends to write the netdev configuration to a writer.

func (*FakeDatapath) WriteNodeConfig added in v1.16.0

WriteNodeConfig pretends to write the datapath configuration to the writer.

func (*FakeDatapath) WriteTemplateConfig added in v1.16.0

WriteTemplateConfig pretends to write the endpoint configuration to a writer.

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 (f *FakeLoader) EndpointHash(cfg datapath.EndpointConfiguration) (string, error)

func (*FakeLoader) HostDatapathInitialized added in v1.16.0

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

func (*FakeLoader) Reinitialize added in v1.16.0

Reinitialize does nothing.

func (*FakeLoader) ReinitializeXDP added in v1.16.0

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

func (*FakeLoader) ReloadDatapath added in v1.16.0

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

func (*FakeLoader) Unload added in v1.16.0

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

func (*FakeLoader) WriteEndpointConfig added in v1.16.0

func (f *FakeLoader) WriteEndpointConfig(w io.Writer, e datapath.EndpointConfiguration) error

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) Reinitialize added in v1.16.0

func (f *FakeOrchestrator) Reinitialize(ctx context.Context) 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