portallocator

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2014 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BeginPortRange = 49153
	EndPortRange   = 65535
)

Variables

View Source
var (
	ErrPortAlreadyAllocated = errors.New("port has already been allocated")
	ErrPortExceedsRange     = errors.New("port exceeds upper range")
	ErrUnknownProtocol      = errors.New("unknown protocol")
)

Functions

func ReleaseAll

func ReleaseAll() error

func ReleasePort

func ReleasePort(ip net.IP, proto string, port int) error

ReleasePort will return the provided port back into the pool for reuse

func RequestPort

func RequestPort(ip net.IP, proto string, port int) (int, error)

RequestPort returns an available port if the port is 0 If the provided port is not 0 then it will be checked if it is available for allocation

Types

This section is empty.

Jump to

Keyboard shortcuts

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