testutils

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2015 License: Apache-2.0 Imports: 15 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckTcp4Port

func CheckTcp4Port(port int) (bool, error)

func GetDefaultGWv4

func GetDefaultGWv4() (string, error)

func GetDefaultGWv6

func GetDefaultGWv6() (string, error)

func GetGW

func GetGW(iface string, family int) (string, error)

func GetGWv4

func GetGWv4(iface string) (string, error)

func GetGWv6

func GetGWv6(iface string) (string, error)

func GetIPs

func GetIPs(ifaceWanted string, familyWanted int) ([]string, error)

func GetIPsv4

func GetIPsv4(iface string) ([]string, error)

func GetIPsv6

func GetIPsv6(iface string) ([]string, error)

func GetNextFreePort4

func GetNextFreePort4() (int, error)

func GetNonLoIfaceIPv4

func GetNonLoIfaceIPv4() (string, error)

func GetNonLoIfaceWithAddrs

func GetNonLoIfaceWithAddrs(ipFamily int) (iface net.Interface, addrs []string, err error)

func HttpGet

func HttpGet(addr string) (string, error)

func HttpServe

func HttpServe(addr string, timeout int) error

Types

type GoroutineAssistant

type GoroutineAssistant struct {
	// contains filtered or unexported fields
}

func NewGoroutineAssistant

func NewGoroutineAssistant(t *testing.T) *GoroutineAssistant

func (*GoroutineAssistant) Add

func (a *GoroutineAssistant) Add(n int)

func (*GoroutineAssistant) Done

func (a *GoroutineAssistant) Done()

func (*GoroutineAssistant) Fatalf

func (a *GoroutineAssistant) Fatalf(s string, args ...interface{})

func (*GoroutineAssistant) Wait

func (a *GoroutineAssistant) Wait()

Jump to

Keyboard shortcuts

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