Help us shape the future of Go! Take the 2026 Go Developer Survey

fake

package
v1.20.3 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: Apache-2.0 Imports: 7 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 Handler

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

func NewHandler

func NewHandler() *Handler

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

func (*Handler) AllNodeValidateImplementation

func (n *Handler) AllNodeValidateImplementation()

func (*Handler) DumpNodeIDs

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

func (*Handler) GetNodeID

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

func (*Handler) GetNodeIP

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

func (*Handler) Name

func (n *Handler) Name() string

func (*Handler) NodeAdd

func (n *Handler) NodeAdd(newNode types.Node) error

func (*Handler) NodeDelete

func (n *Handler) NodeDelete(node types.Node) error

func (*Handler) NodeUpdate

func (n *Handler) NodeUpdate(oldNode, newNode types.Node) error

func (*Handler) NodeValidateImplementation

func (n *Handler) NodeValidateImplementation(node types.Node) error

func (*Handler) RestoreNodeIDs

func (n *Handler) RestoreNodeIDs()

Jump to

Keyboard shortcuts

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