availableport

package
v28.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Find

func Find(n uint, options ...Options) (ports []uint, err error)

Find finds n number of unused ports. it is not guaranteed that these ports will not be allocated to another program in the time of calling Find().

Types

type Options

type Options func(o *availablePortOptions)

func WithMaxPort

func WithMaxPort(maxPort uint) Options

func WithMinPort

func WithMinPort(minPort uint) Options

func WithRandomizer

func WithRandomizer(r *rand.Rand) Options

Jump to

Keyboard shortcuts

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