network_pool

package
v0.0.0-...-68efac8 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2014 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NetworkPool

type NetworkPool interface {
	Acquire() (*network.Network, error)
	Release(*network.Network)
	Remove(*network.Network) error
	Network() *net.IPNet
	InitialSize() int
}

type NetworkTakenError

type NetworkTakenError struct {
	Network *network.Network
}

func (NetworkTakenError) Error

func (e NetworkTakenError) Error() string

type PoolExhaustedError

type PoolExhaustedError struct{}

func (PoolExhaustedError) Error

func (e PoolExhaustedError) Error() string

type RealNetworkPool

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

func New

func New(ipNet *net.IPNet) *RealNetworkPool

func (*RealNetworkPool) Acquire

func (p *RealNetworkPool) Acquire() (*network.Network, error)

func (*RealNetworkPool) InitialSize

func (p *RealNetworkPool) InitialSize() int

func (*RealNetworkPool) Network

func (p *RealNetworkPool) Network() *net.IPNet

func (*RealNetworkPool) Release

func (p *RealNetworkPool) Release(network *network.Network)

func (*RealNetworkPool) Remove

func (p *RealNetworkPool) Remove(network *network.Network) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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