fake

package
v1.21.0-pre.4 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 5 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 NewAddressing

func NewAddressing() node.Addressing

NewAddressing returns a new fake node addressing

func NewIPv4OnlyAddressing

func NewIPv4OnlyAddressing() node.Addressing

NewIPv4OnlyAddressing returns a new fake node addressing where IPv6 is disabled

func NewIPv6OnlyAddressing

func NewIPv6OnlyAddressing() node.Addressing

NewIPv6OnlyAddressing returns a new fake node addressing where IPv4 is disabled

Types

type IDHandler

type IDHandler struct{}

func NewIDHandler

func NewIDHandler() *IDHandler

NewIDHandler returns a fake node ID handler.

func (*IDHandler) DumpNodeIDs

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

func (*IDHandler) GetNodeID

func (n *IDHandler) GetNodeID(_ netip.Addr) (uint16, bool)

func (*IDHandler) GetNodeIP

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

func (*IDHandler) RestoreNodeIDs

func (n *IDHandler) RestoreNodeIDs()

Jump to

Keyboard shortcuts

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