- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for AllIPv4 (0.22 sec)
-
pilot/pkg/util/network/ip.go
// skip it to prevent a panic. continue } if addr.Is4() { return false } } return true } // AllIPv4 checks the addresses slice and returns true if all addresses // are valid IPv4 address, for all other cases it returns false. func AllIPv4(ipAddrs []string) bool { for i := 0; i < len(ipAddrs); i++ { addr, err := netip.ParseAddr(ipAddrs[i]) if err != nil {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Dec 21 21:27:21 UTC 2023 - 6.3K bytes - Viewed (0) -
pilot/pkg/util/network/ip_test.go
expected: false, }, { name: "test for invalid ip address", addrs: []string{"invalidip"}, expected: true, }, } for _, tt := range tests { result := AllIPv4(tt.addrs) if result != tt.expected { t.Errorf("Test %s failed, expected: %t got: %t", tt.name, tt.expected, result) } } } func TestGlobalUnicastIP(t *testing.T) { tests := []struct {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Dec 08 16:24:15 UTC 2022 - 6.7K bytes - Viewed (0) -
pkg/model/proxy.go
type IPMode int // IPMode constants starting with index 1. const ( IPv4 IPMode = iota + 1 IPv6 Dual ) func DiscoverIPMode(addrs []string) IPMode { if networkutil.AllIPv4(addrs) { return IPv4 } else if networkutil.AllIPv6(addrs) { return IPv6 } return Dual
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Apr 25 17:18:17 UTC 2024 - 18.7K bytes - Viewed (0) -
pkg/bootstrap/config.go
opts = append(opts, getNodeMetadataOptions(cfg.Node, cfg.CompliancePolicy)...) // Check if nodeIP carries IPv4 or IPv6 and set up proxy accordingly if network.AllIPv4(cfg.Metadata.InstanceIPs) { // IPv4 only opts = append(opts, option.Localhost(option.LocalhostIPv4), option.Wildcard(option.WildcardIPv4), option.DNSLookupFamily(option.DNSLookupFamilyIPv4))
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue May 14 17:02:38 UTC 2024 - 27.6K bytes - Viewed (0) -
pilot/pkg/networking/core/cluster_builder.go
CommonLbConfig: &cluster.Cluster_CommonLbConfig{}, } switch discoveryType { case cluster.Cluster_STRICT_DNS, cluster.Cluster_LOGICAL_DNS: if networkutil.AllIPv4(cb.proxyIPAddresses) { // IPv4 only c.DnsLookupFamily = cluster.Cluster_V4_ONLY } else if networkutil.AllIPv6(cb.proxyIPAddresses) { // IPv6 only c.DnsLookupFamily = cluster.Cluster_V6_ONLY } else {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Jun 13 01:56:28 UTC 2024 - 31.6K bytes - Viewed (0)