Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddrStruct ¶
type AddrStruct struct{ Val string }
AddrStruct implements the net.Addr for test purpose.
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 (*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) Addrs ¶
func (f *FakeNetwork) Addrs(intf *net.Interface) ([]net.Addr, error)
Addrs is part of NetworkInterfacer interface.
func (*FakeNetwork) Interfaces ¶
func (f *FakeNetwork) Interfaces() ([]net.Interface, error)
Interfaces is part of NetworkInterfacer interface.
Click to show internal directories.
Click to hide internal directories.