Versions in this module Expand all Collapse all v0 v0.1.0 Jul 8, 2015 Changes in this version + const DefaultPortRangeEnd + const DefaultPortRangeStart + var ErrAllPortsAllocated = errors.New("all ports are allocated") + var ErrUnknownProtocol = errors.New("unknown protocol") + type ErrPortAlreadyAllocated struct + func (e ErrPortAlreadyAllocated) Error() string + func (e ErrPortAlreadyAllocated) IP() string + func (e ErrPortAlreadyAllocated) IPPort() string + func (e ErrPortAlreadyAllocated) Port() int + type PortAllocator struct + Begin int + End int + func Get() *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)