driver

package
v1.12.6 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 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

This section is empty.

Types

type NetworkAPIs

type NetworkAPIs interface {
	// SetupPodNetwork sets up pod network for normal ENI based pods
	SetupPodNetwork(hostVethName string, contVethName string, netnsPath string, v4Addr *net.IPNet, v6Addr *net.IPNet, deviceNumber int, mtu int, log logger.Logger) error
	// TeardownPodNetwork clean up pod network for normal ENI based pods
	TeardownPodNetwork(containerAddr *net.IPNet, deviceNumber int, log logger.Logger) error

	// SetupBranchENIPodNetwork sets up pod network for branch ENI based pods
	SetupBranchENIPodNetwork(hostVethName string, contVethName string, netnsPath string, v4Addr *net.IPNet, v6Addr *net.IPNet, vlanID int, eniMAC string,
		subnetGW string, parentIfIndex int, mtu int, podSGEnforcingMode sgpp.EnforcingMode, log logger.Logger) error
	// TeardownBranchENIPodNetwork cleans up pod network for branch ENI based pods
	TeardownBranchENIPodNetwork(containerAddr *net.IPNet, vlanID int, podSGEnforcingMode sgpp.EnforcingMode, 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