port

package
v0.18.4-beta.rc1 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ListenerFormat is the format string that is used to generate local
	// listener addresses.
	ListenerFormat = "127.0.0.1:%d"
)

Variables

This section is empty.

Functions

func GenerateSystemUniqueListenerAddresses

func GenerateSystemUniqueListenerAddresses() (string, string)

GenerateSystemUniqueListenerAddresses is a function that returns two listener addresses with unique ports per system and should be used to overwrite rpctest's default generator which is prone to use colliding ports.

func NextAvailablePort

func NextAvailablePort() int

NextAvailablePort returns the first port that is available for listening by a new node, using a lock file to make sure concurrent access for parallel tasks on the same system don't re-use the same port.

Types

This section is empty.

Jump to

Keyboard shortcuts

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