Documentation ¶
Index ¶
Constants ¶
View Source
const (
NameDelimiter = "_"
)
Variables ¶
This section is empty.
Functions ¶
func GenName ¶
func GenName(name string, options ...NameOption) string
Types ¶
type Allocator ¶
type Allocator struct {
// contains filtered or unexported fields
}
func NewAllocator ¶
NewAllocator return a port allocator for testing. Example: from: 10, to: 20, mod 4, index 1 Reserved ports: 13, 17
type NameOption ¶
type NameOption func(*nameBuilder) *nameBuilder
func WithRangePorts ¶
func WithRangePorts(from, to int) NameOption
Click to show internal directories.
Click to hide internal directories.