testing

package
v1.24.9 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeNetwork

type FakeNetwork struct {
	NetworkInterfaces []net.Interface
	// The key of map Addrs is the network interface name
	Address map[string][]net.Addr
}

FakeNetwork implements the NetworkInterfacer interface for test purpose.

func NewFakeNetwork

func NewFakeNetwork() *FakeNetwork

NewFakeNetwork initializes a FakeNetwork.

func (*FakeNetwork) AddInterfaceAddr

func (f *FakeNetwork) AddInterfaceAddr(intf *net.Interface, addrs []net.Addr)

AddInterfaceAddr create an interface and its associated addresses for FakeNetwork implementation.

func (*FakeNetwork) InterfaceAddrs added in v1.22.0

func (f *FakeNetwork) InterfaceAddrs() ([]net.Addr, error)

InterfaceAddrs is part of NetworkInterfacer interface.

Jump to

Keyboard shortcuts

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