Documentation ¶
Index ¶
- Variables
- func NewIPv4OnlyNodeAddressing() types.NodeAddressing
- func NewIPv6OnlyNodeAddressing() types.NodeAddressing
- func NewNodeAddressing() types.NodeAddressing
- type BandwidthManager
- func (fbm *BandwidthManager) BBREnabled() bool
- func (fbm *BandwidthManager) DeleteBandwidthLimit(endpointID uint16)
- func (fbm *BandwidthManager) DeleteEndpointBandwidthLimit(epID uint16) error
- func (fbm *BandwidthManager) Enabled() bool
- func (fbm *BandwidthManager) ResetQueues() bool
- func (fbm *BandwidthManager) UpdateBandwidthLimit(endpointID uint16, bytesPerSecond uint64)
- type FakeDatapath
- func (f *FakeDatapath) BandwidthManager() datapath.BandwidthManager
- func (f *FakeDatapath) FakeNode() *FakeNodeHandler
- func (m *FakeDatapath) GetProxyPorts() map[string]uint16
- func (m *FakeDatapath) InstallNoTrackRules(ip netip.Addr, port uint16)
- func (f *FakeDatapath) InstallProxyRules(uint16, string)
- func (f *FakeDatapath) LBMap() datapath.LBMap
- func (f *FakeDatapath) LBMockMap() *mockmaps.LBMockMap
- func (f *FakeDatapath) Loader() datapath.Loader
- func (f *FakeDatapath) LocalNodeAddressing() datapath.NodeAddressing
- func (f *FakeDatapath) Node() datapath.NodeHandler
- func (f *FakeDatapath) NodeIDs() datapath.NodeIDHandler
- func (f *FakeDatapath) NodeNeighbors() datapath.NodeNeighbors
- func (f *FakeDatapath) Orchestrator() datapath.Orchestrator
- func (m *FakeDatapath) RemoveNoTrackRules(ip netip.Addr, port uint16)
- func (f *FakeDatapath) SupportsOriginalSourceAddr() bool
- func (f *FakeDatapath) WireguardAgent() datapath.WireguardAgent
- func (f *FakeDatapath) WriteEndpointConfig(io.Writer, *datapath.LocalNodeConfiguration, datapath.EndpointConfiguration) error
- func (f *FakeDatapath) WriteNetdevConfig(io.Writer, *option.IntOptions) error
- func (f *FakeDatapath) WriteNodeConfig(io.Writer, *datapath.LocalNodeConfiguration) error
- func (f *FakeDatapath) WriteTemplateConfig(io.Writer, *datapath.LocalNodeConfiguration, datapath.EndpointConfiguration) error
- type FakeLoader
- func (f *FakeLoader) CallsMapPath(id uint16) string
- func (f *FakeLoader) CompileOrLoad(ctx context.Context, ep datapath.Endpoint, stats *metrics.SpanStat) error
- func (f *FakeLoader) CustomCallsMapPath(id uint16) string
- func (f *FakeLoader) DetachXDP(ifaceName string, bpffsBase, progName string) error
- func (f *FakeLoader) EndpointHash(cfg datapath.EndpointConfiguration) (string, error)
- func (f *FakeLoader) HostDatapathInitialized() <-chan struct{}
- func (f *FakeLoader) Reinitialize(ctx context.Context, cfg datapath.LocalNodeConfiguration, ...) error
- func (f *FakeLoader) ReinitializeXDP(ctx context.Context, extraCArgs []string) error
- func (f *FakeLoader) ReloadDatapath(ctx context.Context, ep datapath.Endpoint, stats *metrics.SpanStat) (string, error)
- func (f *FakeLoader) Unload(ep datapath.Endpoint)
- func (f *FakeLoader) WriteEndpointConfig(w io.Writer, e datapath.EndpointConfiguration) error
- type FakeNodeHandler
- func (n *FakeNodeHandler) AllNodeValidateImplementation()
- func (n *FakeNodeHandler) DeleteMiscNeighbor(oldNode *nodeTypes.Node)
- func (n *FakeNodeHandler) DumpNodeIDs() []*models.NodeID
- func (n *FakeNodeHandler) GetNodeID(_ net.IP) (uint16, bool)
- func (n *FakeNodeHandler) GetNodeIP(_ uint16) string
- func (n *FakeNodeHandler) InsertMiscNeighbor(newNode *nodeTypes.Node)
- func (n *FakeNodeHandler) Name() string
- func (n *FakeNodeHandler) NodeAdd(newNode nodeTypes.Node) error
- func (n *FakeNodeHandler) NodeCleanNeighbors(migrateOnly bool)
- func (n *FakeNodeHandler) NodeConfigurationChanged(config datapath.LocalNodeConfiguration) error
- func (n *FakeNodeHandler) NodeDelete(node nodeTypes.Node) error
- func (n *FakeNodeHandler) NodeNeighDiscoveryEnabled() bool
- func (n *FakeNodeHandler) NodeNeighborRefresh(ctx context.Context, node nodeTypes.Node, refresh bool) error
- func (n *FakeNodeHandler) NodeUpdate(oldNode, newNode nodeTypes.Node) error
- func (n *FakeNodeHandler) NodeValidateImplementation(node nodeTypes.Node) error
- func (n *FakeNodeHandler) RestoreNodeIDs()
- type FakeOrchestrator
- type IPSet
- type MTU
Constants ¶
This section is empty.
Variables ¶
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
func (f *FakeDatapath) WriteEndpointConfig(io.Writer, *datapath.LocalNodeConfiguration, datapath.EndpointConfiguration) error
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
func (f *FakeDatapath) WriteNodeConfig(io.Writer, *datapath.LocalNodeConfiguration) error
WriteNodeConfig pretends to write the datapath configuration to the writer.
func (*FakeDatapath) WriteTemplateConfig ¶ added in v1.16.0
func (f *FakeDatapath) WriteTemplateConfig(io.Writer, *datapath.LocalNodeConfiguration, datapath.EndpointConfiguration) error
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 (*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
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) 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 (*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 (*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 (*IPSet) NewInitializer ¶ added in v1.16.0
func (f *IPSet) NewInitializer() ipset.Initializer
type MTU ¶ added in v1.16.0
type MTU struct{}
func (*MTU) GetDeviceMTU ¶ added in v1.16.0
GetDeviceMTU implements mtu.MTU.
func (*MTU) GetRouteMTU ¶ added in v1.16.0
GetRouteMTU implements mtu.MTU.
func (*MTU) GetRoutePostEncryptMTU ¶ added in v1.16.0
GetRoutePostEncryptMTU implements mtu.MTU.