ipam

package
Version: v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 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

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

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

type RangeSet

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