Documentation
¶
Index ¶
- Constants
- func AcquireNextID(l []*NetworkConfigList) (int, error)
- func GenerateIPAM(driver string, subnetStr string) (map[string]interface{}, error)
- func GetBridgeName(id int) string
- func NerdctlID(b []byte) *int
- func NerdctlLabels(b []byte) *map[string]string
- type CNIEnv
- type CNIPlugin
- type IPAMRoute
- type IPRange
- type NetworkConfigList
Constants ¶
View Source
const ( DefaultNetworkName = "bridge" DefaultID = 0 DefaultCIDR = "10.4.0.0/24" DefaultCNIPlugin = "bridge" DefaultIPAMDriver = "host-local" )
Variables ¶
This section is empty.
Functions ¶
func AcquireNextID ¶
func AcquireNextID(l []*NetworkConfigList) (int, error)
AcquireNextID suggests the next ID.
func GenerateIPAM ¶ added in v0.16.0
func GetBridgeName ¶ added in v0.16.0
func NerdctlLabels ¶ added in v0.11.0
Types ¶
type NetworkConfigList ¶
type NetworkConfigList struct { *libcni.NetworkConfigList NerdctlID *int NerdctlLabels *map[string]string File string }
func ConfigLists ¶
func ConfigLists(e *CNIEnv) ([]*NetworkConfigList, error)
ConfigLists loads config from dir if dir exists. The result also contains DefaultConfigList
func DefaultConfigList ¶
func DefaultConfigList(e *CNIEnv) (*NetworkConfigList, error)
func GenerateConfigList ¶
func GenerateConfigList(e *CNIEnv, labels []string, id int, name string, plugins []CNIPlugin) (*NetworkConfigList, error)
GenerateConfigList creates NetworkConfigList. GenerateConfigList does not fill "File" field.
TODO: enable CNI isolation plugin
Click to show internal directories.
Click to hide internal directories.