Versions in this module Expand all Collapse all v0 v0.5.0 Feb 5, 2016 v0.2.1 Jul 6, 2015 Changes in this version + const DefaultPortRangeEnd + const DefaultPortRangeStart + var DefaultPortAllocator = New() + var ErrAllPortsAllocated = errors.New("all ports are allocated") + var ErrUnknownProtocol = errors.New("unknown protocol") + var ReleaseAll = DefaultPortAllocator.ReleaseAll + var ReleasePort = DefaultPortAllocator.ReleasePort + var RequestPort = DefaultPortAllocator.RequestPort + func PortRange() (int, int) + type ErrPortAlreadyAllocated struct + func NewErrPortAlreadyAllocated(ip string, port int) ErrPortAlreadyAllocated + func (e ErrPortAlreadyAllocated) Error() string + func (e ErrPortAlreadyAllocated) IP() string + func (e ErrPortAlreadyAllocated) IPPort() string + func (e ErrPortAlreadyAllocated) Port() int + type PortAllocator struct + func New() *PortAllocator + func (p *PortAllocator) ReleaseAll() error + func (p *PortAllocator) ReleasePort(ip net.IP, proto string, port int) error + func (p *PortAllocator) RequestPort(ip net.IP, proto string, port int) (int, error)