Documentation ¶
Index ¶
- Variables
- type MockNetIO
- func (netshim *MockNetIO) GetNetworkInterfaceAddrs(iface *net.Interface) ([]net.Addr, error)
- func (netshim *MockNetIO) GetNetworkInterfaceByMac(mac net.HardwareAddr) (*net.Interface, error)
- func (netshim *MockNetIO) GetNetworkInterfaceByName(name string) (*net.Interface, error)
- func (netshim *MockNetIO) SetGetInterfaceValidatonFn(fn getInterfaceValidationFn)
- type NetIO
- func (ns *NetIO) GetNetworkInterfaceAddrs(iface *net.Interface) ([]net.Addr, error)
- func (ns *NetIO) GetNetworkInterfaceByMac(mac net.HardwareAddr) (*net.Interface, error)
- func (ns *NetIO) GetNetworkInterfaceByName(name string) (*net.Interface, error)
- func (ns *NetIO) GetNetworkInterfaces() ([]net.Interface, error)
- type NetIOInterface
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMockNetIOFail = errors.New("netio fail") HwAddr, _ = net.ParseMAC("ab:cd:ef:12:34:56") BadHwAddr, _ = net.ParseMAC("56:34:12:ef:cd:ab") )
ErrMockNetIOFail - mock netio error
View Source
var ErrInterfaceNil = errors.New("Interface is nil")
ErrInterfaceNil - errors out when interface is nil
View Source
var ErrInterfaceNotFound = errors.New("Inteface not found")
Functions ¶
This section is empty.
Types ¶
type MockNetIO ¶
type MockNetIO struct {
// contains filtered or unexported fields
}
func NewMockNetIO ¶
func (*MockNetIO) GetNetworkInterfaceAddrs ¶
func (*MockNetIO) GetNetworkInterfaceByMac ¶
func (*MockNetIO) GetNetworkInterfaceByName ¶
func (*MockNetIO) SetGetInterfaceValidatonFn ¶
func (netshim *MockNetIO) SetGetInterfaceValidatonFn(fn getInterfaceValidationFn)
type NetIO ¶
type NetIO struct{}
func (*NetIO) GetNetworkInterfaceAddrs ¶
func (*NetIO) GetNetworkInterfaceByMac ¶
func (*NetIO) GetNetworkInterfaceByName ¶
Click to show internal directories.
Click to hide internal directories.