Documentation ¶
Index ¶
- Constants
- func ParseMTU(mtu string) (int, error)
- func UsedNetworks(ctx context.Context, client *containerd.Client) (map[string][]string, error)
- type CNIEnv
- func (e *CNIEnv) CreateNetwork(opts CreateOptions) (*NetworkConfig, error)
- func (e *CNIEnv) FilterNetworks(filterf func(*NetworkConfig) bool) ([]*NetworkConfig, error)
- func (e *CNIEnv) GetDefaultNetworkConfig() (*NetworkConfig, error)
- func (e *CNIEnv) NetworkList() ([]*NetworkConfig, error)
- func (e *CNIEnv) NetworkMap() (map[string]*NetworkConfig, error)
- func (e *CNIEnv) RemoveNetwork(net *NetworkConfig) error
- type CNIEnvOpt
- type CNIPlugin
- type CreateOptions
- type IPAMRange
- type IPAMRoute
- type NetworkConfig
Constants ¶
View Source
const ( DefaultNetworkName = "bridge" DefaultCIDR = "10.4.0.0/24" DefaultIPAMDriver = "host-local" // When creating non-default network without passing in `--subnet` option, // nerdctl assigns subnet address for the creation starting from `StartingCIDR` // This prevents subnet address overlapping with `DefaultCIDR` used by the default network StartingCIDR = "10.4.1.0/24" )
Variables ¶
This section is empty.
Functions ¶
func UsedNetworks ¶ added in v1.1.0
Types ¶
type CNIEnv ¶
func (*CNIEnv) CreateNetwork ¶ added in v0.22.1
func (e *CNIEnv) CreateNetwork(opts CreateOptions) (*NetworkConfig, error)
func (*CNIEnv) FilterNetworks ¶ added in v1.1.0
func (e *CNIEnv) FilterNetworks(filterf func(*NetworkConfig) bool) ([]*NetworkConfig, error)
func (*CNIEnv) GetDefaultNetworkConfig ¶ added in v1.1.0
func (e *CNIEnv) GetDefaultNetworkConfig() (*NetworkConfig, error)
GetDefaultNetworkConfig checks whether the default network exists by first searching for if any network bears the `labels.NerdctlDefaultNetwork` label, or falls back to checking whether any network bears the `DefaultNetworkName` name.
func (*CNIEnv) NetworkList ¶ added in v1.1.0
func (e *CNIEnv) NetworkList() ([]*NetworkConfig, error)
func (*CNIEnv) NetworkMap ¶ added in v0.18.0
func (e *CNIEnv) NetworkMap() (map[string]*NetworkConfig, error)
func (*CNIEnv) RemoveNetwork ¶ added in v0.22.1
func (e *CNIEnv) RemoveNetwork(net *NetworkConfig) error
type CNIEnvOpt ¶ added in v1.1.0
func WithDefaultNetwork ¶ added in v1.1.0
func WithDefaultNetwork() CNIEnvOpt
type CreateOptions ¶ added in v0.22.1
type NetworkConfig ¶ added in v1.1.0
Click to show internal directories.
Click to hide internal directories.