port

package
v0.35.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 14, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Allocator

type Allocator struct {
	// contains filtered or unexported fields
}

func NewAllocator

func NewAllocator(from int, to int, mod int, index int) *Allocator

NewAllocator return a port allocator for testing. Example: from: 10, to: 20, mod 4, index 1 Reserved ports: 13, 17

func (*Allocator) Get

func (pa *Allocator) Get() int

func (*Allocator) Release

func (pa *Allocator) Release(port int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL