ipam

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecIPAMAdd

func ExecIPAMAdd(cniArgs *cnipb.CniCmdArgs, ipamType string, resultKey string) (*current.Result, error)

func ExecIPAMCheck

func ExecIPAMCheck(cniArgs *cnipb.CniCmdArgs, ipamType string) error

func ExecIPAMDelete

func ExecIPAMDelete(cniArgs *cnipb.CniCmdArgs, ipamType string, resultKey string) error

func GetIPFromCache added in v0.7.0

func GetIPFromCache(resultKey string) (*current.Result, bool)

func IsIPAMTypeValid

func IsIPAMTypeValid(ipamType string) bool

func RegisterIPAMDriver

func RegisterIPAMDriver(ipamType string, ipamDriver IPAMDriver) error

Types

type IPAMConfig

type IPAMConfig struct {
	Type   string     `json:"type,omitempty"`
	Ranges []RangeSet `json:"ranges,omitempty"`
}

type IPAMDelegator

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

func (*IPAMDelegator) Add

func (d *IPAMDelegator) Add(args *invoke.Args, networkConfig []byte) (*current.Result, error)

func (*IPAMDelegator) Check

func (d *IPAMDelegator) Check(args *invoke.Args, networkConfig []byte) error

func (*IPAMDelegator) Del

func (d *IPAMDelegator) Del(args *invoke.Args, networkConfig []byte) error

type IPAMDriver

type IPAMDriver interface {
	Add(args *invoke.Args, networkConfig []byte) (*current.Result, error)
	Del(args *invoke.Args, networkConfig []byte) error
	Check(args *invoke.Args, networkConfig []byte) error
}

type Range added in v0.11.0

type Range struct {
	Subnet  string `json:"subnet"`
	Gateway string `json:"gateway,omitempty"`
}

type RangeSet added in v0.11.0

type RangeSet []Range

Directories

Path Synopsis
Package testing is a generated GoMock package.
Package testing is a generated GoMock package.

Jump to

Keyboard shortcuts

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