Documentation
¶
Overview ¶
Ports are a limited resource on a host and so must be shared via a central allocator. This package exposes Port - a valid IP port value - and methods for allocation and reservation of those ports.
Index ¶
Constants ¶
View Source
const InvalidPort = 0
Variables ¶
View Source
var ErrAllocationFailed = errors.New("A port could not be allocated.")
Functions ¶
func ReleaseExternalPorts ¶
func StartPortAllocator ¶
func StartPortAllocator(min, max Port)
Types ¶
type Port ¶
type Port uint
An IP port, valid from 1 to 65535. Use 0 for undefined.
func NewPortFromString ¶
func (Port) PortPathsFor ¶
type PortPairs ¶
type PortPairs []PortPair
func FromPortPairHeader ¶
Click to show internal directories.
Click to hide internal directories.