Documentation ¶
Index ¶
Constants ¶
View Source
const (
NameDelimiter = "_"
)
Variables ¶
This section is empty.
Functions ¶
func GenName ¶ added in v0.37.0
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 ¶ added in v0.37.0
type NameOption func(*nameBuilder) *nameBuilder
func WithRangePorts ¶ added in v0.37.0
func WithRangePorts(from, to int) NameOption
Click to show internal directories.
Click to hide internal directories.