Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PortChooser ¶
type PortChooser struct {
// contains filtered or unexported fields
}
PortChooser does not store any port information. It was created only for API purposes.
func (*PortChooser) Acquire ¶
func (pc *PortChooser) Acquire() int
Acquire applies all filters defined before and returns a port number.
func (*PortChooser) NonRoot ¶
func (pc *PortChooser) NonRoot() *PortChooser
NonRoot enables the non-root port requirement: min port will be 1025 to ensure anything is ok.
func (*PortChooser) Root ¶
func (pc *PortChooser) Root() *PortChooser
Root enables root-only port requirement: max port will be 1024.
func (*PortChooser) Unused ¶
func (pc *PortChooser) Unused() *PortChooser
Unused enables a check that port is free.
func (*PortChooser) Used ¶
func (pc *PortChooser) Used() *PortChooser
Used enables a check that port is not free.
Click to show internal directories.
Click to hide internal directories.