Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsNoSuchRule ¶
ContainsNoSuchRule report whether the rule is not exist
func GetConfigForDebug ¶
func GetConfigForDebug() map[string]interface{}
GetConfigForDebug returns the active values of the configuration env vars (for debugging purposes).
func IsRuleExistsError ¶
IsRuleExistsError report whether the rule is exist
Types ¶
type NetworkAPIs ¶
type NetworkAPIs interface { // SetupNodeNetwork performs node level network configuration SetupHostNetwork(vpcCIDR *net.IPNet, vpcCIDRs []*string, primaryMAC string, primaryAddr *net.IP) error // SetupNICNetwork performs nic level network configuration SetupNICNetwork(nicIP string, mac string, table int, subnetCIDR string) error UseExternalSNAT() bool 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, table int) error DeleteRuleListBySrc(src net.IPNet) error }
NetworkAPIs defines the host level and the nic level network related operations
func NewFakeNetworkAPI ¶
func NewFakeNetworkAPI(netlink netlinkwrapper.NetLink, iptableIface iptables.IptablesIface, findPrimaryName func(string) (string, error), setProcSys func(string, string) error) NetworkAPIs
NewFakeNetworkAPI is used by unit test
Click to show internal directories.
Click to hide internal directories.