portassigner

package
v0.0.0-...-1310e1d Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package portassigner implements a thread safe port assigner in a predefined range

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PortAssigner

type PortAssigner interface {
	AssignPort() (int, error)
	ReleasePort(port int)
	Close()
}

PortAssigner is the port assigner service. As soon as it's instantiated with New can be used but as soon as it's closed you can no longer call its methods.

func New

func New(minPASVPort, maxPASVPort int) PortAssigner

New creates a new portassigner with a specified port range

Jump to

Keyboard shortcuts

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