testing

package
v1.14.9 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2019 License: Apache-2.0 Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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.

func (AddrStruct) Network

func (a AddrStruct) Network() string

Network is part of net.Addr interface.

func (AddrStruct) String

func (a AddrStruct) String() string

String is part of net.Addr interface.

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) 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.

Jump to

Keyboard shortcuts

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