- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for isValidEndpoint (0.27 sec)
-
pkg/proxy/util/utils_test.go
netutils "k8s.io/utils/net" ) func TestValidateWorks(t *testing.T) { if isValidEndpoint("", 0) { t.Errorf("Didn't fail for empty set") } if isValidEndpoint("foobar", 0) { t.Errorf("Didn't fail with invalid port") } if isValidEndpoint("foobar", -1) { t.Errorf("Didn't fail with a negative port") } if !isValidEndpoint("foobar", 8080) { t.Errorf("Failed a valid config.") } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon May 20 11:57:43 UTC 2024 - 17.1K bytes - Viewed (0) -
pkg/proxy/util/utils.go
IPv4ZeroCIDR = "0.0.0.0/0" // IPv6ZeroCIDR is the CIDR block for the whole IPv6 address space IPv6ZeroCIDR = "::/0" ) // isValidEndpoint checks that the given host / port pair are valid endpoint func isValidEndpoint(host string, port int) bool { return host != "" && port > 0 } // IsZeroCIDR checks whether the input CIDR string is either // the IPv4 or IPv6 zero CIDR
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon May 20 11:57:43 UTC 2024 - 7.4K bytes - Viewed (0)