fake

package
v1.11.20 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package fake is a fake datapath implementation. It does not implement any datapath specific concepts and is useful for mocking and testing.

Index

Constants

This section is empty.

Variables

View Source
var (
	IPv4InternalAddress = net.ParseIP("2.2.2.2")
	IPv4NodePortAddress = net.ParseIP("3.3.3.3")

	IPv6InternalAddress = net.ParseIP("f00d::1")
	IPv6NodePortAddress = net.ParseIP("f00d::2")
)

Functions

func NewDatapath

func NewDatapath() datapath.Datapath

NewDatapath returns a new fake datapath

func NewIPv4OnlyNodeAddressing

func NewIPv4OnlyNodeAddressing() datapath.NodeAddressing

NewIPv4OnlyNodeAddressing returns a new fake node addressing where IPv6 is disabled

func NewIPv6OnlyNodeAddressing

func NewIPv6OnlyNodeAddressing() datapath.NodeAddressing

NewIPv6OnlyNodeAddressing returns a new fake node addressing where IPv4 is disabled

func NewNodeAddressing

func NewNodeAddressing() datapath.NodeAddressing

NewNodeAddressing returns a new fake node addressing

Types

type FakeNodeHandler

type FakeNodeHandler struct{}

func NewNodeHandler

func NewNodeHandler() *FakeNodeHandler

NewNodeHandler returns a fake NodeHandler that performs no actions

func (*FakeNodeHandler) DumpNodeIDs

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

func (*FakeNodeHandler) NodeAdd

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

func (*FakeNodeHandler) NodeCleanNeighbors

func (n *FakeNodeHandler) NodeCleanNeighbors(migrateOnly bool)

func (*FakeNodeHandler) NodeConfigurationChanged

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

func (*FakeNodeHandler) NodeDelete

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

func (*FakeNodeHandler) NodeNeighDiscoveryEnabled

func (n *FakeNodeHandler) NodeNeighDiscoveryEnabled() bool

func (*FakeNodeHandler) NodeNeighborRefresh

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

func (*FakeNodeHandler) NodeUpdate

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

func (*FakeNodeHandler) NodeValidateImplementation

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

func (*FakeNodeHandler) RestoreNodeIDs

func (n *FakeNodeHandler) RestoreNodeIDs()

Jump to

Keyboard shortcuts

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