driver

package
v1.10.3 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package driver is the CNI network driver setting up iptables, routes and rules

Index

Constants

View Source
const (
	WAIT_INTERVAL = 50 * time.Millisecond
)

Variables

This section is empty.

Functions

func WaitForAddressesToBeStable added in v1.10.0

func WaitForAddressesToBeStable(ifName string, timeout time.Duration) error

Implements `SettleAddresses` functionality of the `ip` package. WaitForAddressesToBeStable waits for all addresses on a link to leave tentative state. Will be particularly useful for ipv6, where all addresses need to do DAD. If any addresses are still tentative after timeout seconds, then error.

Types

type NetworkAPIs

type NetworkAPIs interface {
	SetupNS(hostVethName string, contVethName string, netnsPath string, v4Addr *net.IPNet, v6Addr *net.IPNet, deviceNumber int, vpcCIDRs []string, useExternalSNAT bool, mtu int, log logger.Logger) error
	TeardownNS(addr *net.IPNet, deviceNumber int, log logger.Logger) error
	SetupPodENINetwork(hostVethName string, contVethName string, netnsPath string, v4Addr *net.IPNet, v6Addr *net.IPNet, vlanID int, eniMAC string,
		subnetGW string, parentIfIndex int, mtu int, log logger.Logger) error
	TeardownPodENINetwork(vlanID int, log logger.Logger) error
}

NetworkAPIs defines network API calls

func New

func New() NetworkAPIs

New creates linuxNetwork object

Directories

Path Synopsis
Package mock_driver is a generated GoMock package.
Package mock_driver is a generated GoMock package.

Jump to

Keyboard shortcuts

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