testbind

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const LocalhostBindHost = bindHost("localhost")

Variables

View Source
var (
	PortPollInterval = 10 * time.Millisecond
	PortPollTimeout  = 3 * time.Second
)

Functions

func DynamicPort

func DynamicPort() int

DynamicPort supplies random free net ports to use.

func MustWaitForAddrPortDown

func MustWaitForAddrPortDown(ctx context.Context, t *testing.T, addr string)

func MustWaitForAddrPortUp

func MustWaitForAddrPortUp(ctx context.Context, t *testing.T, addr string) (conn net.Conn)

func MustWaitForPortListenDown

func MustWaitForPortListenDown(ctx context.Context, t *testing.T, port int)

func MustWaitForPortListenUp

func MustWaitForPortListenUp(ctx context.Context, t *testing.T, port int) (conn net.Conn)

Types

This section is empty.

Jump to

Keyboard shortcuts

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