Help us shape the future of Go! Take the 2026 Go Developer Survey

ipam

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2017 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPAM

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

func New

func New(cfg *config.IPAM) *IPAM

func (*IPAM) GetCapabilities

func (m *IPAM) GetCapabilities() (*ipam.CapabilitiesResponse, error)

GetCapabilities Called on `docker network create`

func (*IPAM) GetDefaultAddressSpaces

func (m *IPAM) GetDefaultAddressSpaces() (*ipam.AddressSpacesResponse, error)

GetDefaultAddressSpaces Called on `docker network create`

func (*IPAM) ListSubNets

func (m *IPAM) ListSubNets(c *gin.Context)

func (*IPAM) ReleaseAddress

func (m *IPAM) ReleaseAddress(req *ipam.ReleaseAddressRequest) error

func (*IPAM) ReleasePool

func (m *IPAM) ReleasePool(req *ipam.ReleasePoolRequest) error

ReleasePool Called on `docker network rm`

func (*IPAM) RequestAddress

func (m *IPAM) RequestAddress(req *ipam.RequestAddressRequest) (*ipam.RequestAddressResponse, error)

RequestAddress Called on `container start` and `network create --gateway`

func (*IPAM) RequestPool

func (m *IPAM) RequestPool(req *ipam.RequestPoolRequest) (*ipam.RequestPoolResponse, error)

RequestPool Called on `docker network create`

func (*IPAM) Serve

func (m *IPAM) Serve() error

func (*IPAM) SetIPPool

func (m *IPAM) SetIPPool(pool *IPPoolRange) error

func (*IPAM) SetSubNetPool

func (m *IPAM) SetSubNetPool(c *gin.Context)

func (*IPAM) StoreSetup

func (m *IPAM) StoreSetup() error

type IPPoolRange

type IPPoolRange struct {
	IPStart string `json:"ip_start"` // CIDR
	IPEnd   string `json:"ip_end"`   // CIDR
}

IPPoolRange

func (*IPPoolRange) IPList

func (r *IPPoolRange) IPList() []string

func (*IPPoolRange) SubNetID

func (r *IPPoolRange) SubNetID() (string, error)

func (*IPPoolRange) Valid

func (r *IPPoolRange) Valid() error

type SubNet

type SubNet struct {
	ID      string `json:"id"`
	CIDR    string `json:"cidr"`
	IPNet   string `json:"ipnet"`
	IPStart string `json:"ip_start"`
	IPEnd   string `json:"ip_end"`
	Mask    int    `json:"mask"`
}

SubNet

func NewSubNet

func NewSubNet(cidr string) (*SubNet, error)

Jump to

Keyboard shortcuts

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