port_pool

package
v0.333.2-candidate Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2016 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveState

func SaveState(filePath string, state State) error

Types

type PoolExhaustedError

type PoolExhaustedError struct{}

func (PoolExhaustedError) Error

func (e PoolExhaustedError) Error() string

type PortPool

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

func New

func New(start, size uint32, state State) (*PortPool, error)

func (*PortPool) Acquire

func (p *PortPool) Acquire() (uint32, error)

func (*PortPool) RefreshState

func (p *PortPool) RefreshState() State

func (*PortPool) Release

func (p *PortPool) Release(port uint32)

func (*PortPool) Remove

func (p *PortPool) Remove(port uint32) error

type PortTakenError

type PortTakenError struct {
	Port uint32
}

func (PortTakenError) Error

func (e PortTakenError) Error() string

type State

type State struct {
	Offset uint32 `json:"offset"`
}

func LoadState

func LoadState(filePath string) (State, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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