Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PortDistributor ¶
type PortDistributor struct {
// contains filtered or unexported fields
}
func NewPortDistributor ¶
func NewPortDistributor(allowedPorts mapset.Set) *PortDistributor
func NewPortDistributorForTests ¶
func NewPortDistributorForTests(allowedPorts, tcpPortsPool, udpPortsPool mapset.Set) *PortDistributor
NewPortDistributorForTests is used only for unit-testing.
func (*PortDistributor) GetRandomPort ¶
func (d *PortDistributor) GetRandomPort(protocol string) (int, error)
func (*PortDistributor) IsPortAllowed ¶
func (d *PortDistributor) IsPortAllowed(port int) bool
func (*PortDistributor) IsPortBusy ¶
func (d *PortDistributor) IsPortBusy(protocol string, port int) bool
func (*PortDistributor) Refresh ¶
func (d *PortDistributor) Refresh() error
Click to show internal directories.
Click to hide internal directories.