allocator

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2017 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPAMArgs

type IPAMArgs struct {
	types.CommonArgs
	IP net.IP `json:"ip,omitempty"`
}

type IPAMConfig

type IPAMConfig struct {
	Name       string
	Type       string        `json:"type"`
	RangeStart net.IP        `json:"rangeStart"`
	RangeEnd   net.IP        `json:"rangeEnd"`
	Subnet     types.IPNet   `json:"subnet"`
	Gateway    net.IP        `json:"gateway"`
	Routes     []types.Route `json:"routes"`
	DataDir    string        `json:"dataDir"`
	ResolvConf string        `json:"resolvConf"`
	Args       *IPAMArgs     `json:"-"`
}

IPAMConfig represents the IP related network configuration.

func LoadIPAMConfig

func LoadIPAMConfig(bytes []byte, args string) (*IPAMConfig, error)

NewIPAMConfig creates a NetworkConfig from the given network name.

type IPAllocator

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

func NewIPAllocator

func NewIPAllocator(conf *IPAMConfig, store backend.Store) (*IPAllocator, error)

func (*IPAllocator) Get

func (a *IPAllocator) Get(id string) (*types.IPConfig, error)

Returns newly allocated IP along with its config

func (*IPAllocator) Release

func (a *IPAllocator) Release(id string) error

Releases all IPs allocated for the container with given ID

type Net

type Net struct {
	Name string      `json:"name"`
	IPAM *IPAMConfig `json:"ipam"`
}

Jump to

Keyboard shortcuts

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