Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PortManager ¶
type PortManager interface { // ReservePort reserves a new port. The lifecycle of the returned port is transferred to the caller. ReservePort() (ReservedPort, error) // Close shuts down this manager and frees any associated resources. Close() error }
PortManager is responsible for reserving ports for an application.
func NewPortManager ¶
func NewPortManager() (mgr PortManager, err error)
NewPortManager allocates a new PortManager
type ReservedPort ¶
type ReservedPort interface { // GetPort returns the bound port number. GetPort() uint16 // Close unbinds this port. Close() error }
ReservedPort a port reserved by a PortManager
Click to show internal directories.
Click to hide internal directories.