netutil

package
v0.22.1 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultNetworkName = "bridge"
	DefaultCIDR        = "10.4.0.0/24"
	DefaultIPAMDriver  = "host-local"
)

Variables

This section is empty.

Functions

func ParseMTU added in v0.16.1

func ParseMTU(mtu string) (int, error)

ParseMTU parses the mtu option

Types

type CNIEnv

type CNIEnv struct {
	Path        string
	NetconfPath string
	Networks    []*networkConfig
}

func NewCNIEnv added in v0.18.0

func NewCNIEnv(cniPath, cniConfPath string) (*CNIEnv, error)

func (*CNIEnv) CreateNetwork added in v0.22.1

func (e *CNIEnv) CreateNetwork(opts CreateOptions) (*networkConfig, error)

func (*CNIEnv) NetworkMap added in v0.18.0

func (e *CNIEnv) NetworkMap() map[string]*networkConfig

func (*CNIEnv) RemoveNetwork added in v0.22.1

func (e *CNIEnv) RemoveNetwork(net *networkConfig) error

type CNIPlugin added in v0.16.0

type CNIPlugin interface {
	GetPluginType() string
}

type CreateOptions added in v0.22.1

type CreateOptions struct {
	Name        string
	Driver      string
	Options     map[string]string
	IPAMDriver  string
	IPAMOptions map[string]string
	Subnet      string
	Gateway     string
	IPRange     string
	Labels      []string
}

type IPAMRange added in v0.16.1

type IPAMRange struct {
	Subnet     string `json:"subnet"`
	RangeStart string `json:"rangeStart,omitempty"`
	RangeEnd   string `json:"rangeEnd,omitempty"`
	Gateway    string `json:"gateway,omitempty"`
	IPRange    string `json:"ipRange,omitempty"`
}

type IPAMRoute added in v0.16.0

type IPAMRoute struct {
	Dst     string `json:"dst,omitempty"`
	GW      string `json:"gw,omitempty"`
	Gateway string `json:"gateway,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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