networkutils

package
v1.6.3-rc1 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2020 License: Apache-2.0 Imports: 20 Imported by: 25

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigForDebug added in v1.2.0

func GetConfigForDebug() map[string]interface{}

GetConfigForDebug returns the active values of the configuration env vars (for debugging purposes).

func GetEthernetMTU added in v1.6.1

func GetEthernetMTU(envMTUValue string) int

GetEthernetMTU gets the MTU setting from AWS_VPC_ENI_MTU if set, or takes the passed in string. Defaults to 9001 if not set.

func LinkByMac

func LinkByMac(mac string, netLink netlinkwrapper.NetLink, retryInterval time.Duration) (netlink.Link, error)

LinkByMac returns linux netlink based on interface MAC

Types

type NetworkAPIs

type NetworkAPIs interface {
	// SetupNodeNetwork performs node level network configuration
	SetupHostNetwork(vpcCIDR *net.IPNet, vpcCIDRs []*string, primaryMAC string, primaryAddr *net.IP) error
	// SetupENINetwork performs eni level network configuration
	SetupENINetwork(eniIP string, mac string, table int, subnetCIDR string) error
	UseExternalSNAT() bool
	GetExcludeSNATCIDRs() []string
	GetRuleList() ([]netlink.Rule, error)
	GetRuleListBySrc(ruleList []netlink.Rule, src net.IPNet) ([]netlink.Rule, error)
	UpdateRuleListBySrc(ruleList []netlink.Rule, src net.IPNet, toCIDRs []string, toFlag bool) error
	DeleteRuleListBySrc(src net.IPNet) error
}

NetworkAPIs defines the host level and the ENI level network related operations

func New

func New() NetworkAPIs

New creates a linuxNetwork object

Directories

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

Jump to

Keyboard shortcuts

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