Back to godoc.org

Package port_pool

v0.0.0-...-f00e791
Latest Go to latest

The latest major version is .

Published: Nov 2, 2016 | License: Apache-2.0 | Module: code.cloudfoundry.org/garden-linux

Index

func SaveState

func SaveState(filePath string, state State) error

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)

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier