- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for NewFakeNetlinkHandle (0.32 sec)
-
pkg/proxy/ipvs/testing/fake.go
// localAddresses is a network interface name to all of its IP addresses map, e.g. // eth0 -> [1.2.3.4, 10.20.30.40] localAddresses map[string][]string IsIPv6 bool } // NewFakeNetlinkHandle will create a new FakeNetlinkHandle func NewFakeNetlinkHandle(isIPv6 bool) *FakeNetlinkHandle { fake := &FakeNetlinkHandle{ localAddresses: make(map[string][]string), IsIPv6: isIPv6, } return fake }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Dec 19 01:20:51 UTC 2023 - 5.5K bytes - Viewed (0) -
pkg/proxy/ipvs/testing/fake_test.go
"k8s.io/kubernetes/pkg/proxy/ipvs" ) // (I am unsure if this test has any value since it only tests the fake implementation) func TestSetGetLocalAddresses(t *testing.T) { fake := NewFakeNetlinkHandle(false) _ = ipvs.NetLinkHandle(fake) // Ensure that the interface is honored fake.SetLocalAddresses("eth0", "1.2.3.4") var expected, addr sets.Set[string] expected = sets.New("1.2.3.4")
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Dec 19 01:20:51 UTC 2023 - 2K bytes - Viewed (0) -
pkg/proxy/ipvs/proxier_test.go
func NewFakeProxier(ctx context.Context, ipt utiliptables.Interface, ipvs utilipvs.Interface, ipset utilipset.Interface, nodeIPs []string, excludeCIDRs []*net.IPNet, ipFamily v1.IPFamily) *Proxier { netlinkHandle := netlinktest.NewFakeNetlinkHandle(ipFamily == v1.IPv6Protocol) netlinkHandle.SetLocalAddresses("eth0", nodeIPs...) // initialize ipsetList with all sets we needed ipsetList := make(map[string]*IPSet) for _, is := range ipsetInfo {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Apr 27 01:31:57 UTC 2024 - 186.8K bytes - Viewed (0)