Documentation
¶
Index ¶
- Constants
- func UsedNetworks(ctx context.Context, client *containerd.Client) (map[string][]string, error)
- type CNIEnv
- func (e *CNIEnv) CreateNetwork(opts types.NetworkCreateOptions) (*NetworkConfig, error)
- func (e *CNIEnv) GetDefaultNetworkConfig() (*NetworkConfig, error)
- func (e *CNIEnv) ListNetworksMatch(reqs []string, allowPseudoNetwork bool) (list map[string][]*NetworkConfig, errs []error)
- func (e *CNIEnv) NetworkByNameOrID(key string) (*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 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 ¶
Types ¶
type CNIEnv ¶
func (*CNIEnv) CreateNetwork ¶
func (e *CNIEnv) CreateNetwork(opts types.NetworkCreateOptions) (*NetworkConfig, error)
func (*CNIEnv) GetDefaultNetworkConfig ¶
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) ListNetworksMatch ¶
func (*CNIEnv) NetworkByNameOrID ¶
func (e *CNIEnv) NetworkByNameOrID(key string) (*NetworkConfig, error)
func (*CNIEnv) NetworkList ¶
func (e *CNIEnv) NetworkList() ([]*NetworkConfig, error)
func (*CNIEnv) NetworkMap ¶
func (e *CNIEnv) NetworkMap() (map[string]*NetworkConfig, error)
func (*CNIEnv) RemoveNetwork ¶
func (e *CNIEnv) RemoveNetwork(net *NetworkConfig) error
type NetworkConfig ¶
Click to show internal directories.
Click to hide internal directories.