Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PredefinedPortAllocator ¶
type PredefinedPortAllocator struct {
ThePort int
}
PredefinedPortAllocator allows selecting concrete port to allocate
func (PredefinedPortAllocator) GetFreePort ¶
func (allocaor PredefinedPortAllocator) GetFreePort() (int, error)
GetFreePort implements PortAllocator
type RandomPortAllocator ¶
type RandomPortAllocator struct{}
RandomPortAllocator allocates random port
func (RandomPortAllocator) GetFreePort ¶
func (allocator RandomPortAllocator) GetFreePort() (int, error)
GetFreePort implements PortAllocator
type RandomPortFromARangeAllocator ¶
type RandomPortFromARangeAllocator struct {
Min, Max int
}
RandomPortFromARangeAllocator returns random number from a range
func (RandomPortFromARangeAllocator) GetFreePort ¶
func (allocator RandomPortFromARangeAllocator) GetFreePort() (int, error)
GetFreePort implements PortAllocator
Click to show internal directories.
Click to hide internal directories.