- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for IPPart (0.06 sec)
-
pkg/proxy/util/endpoints.go
*/ package util import ( "net" "k8s.io/klog/v2" netutils "k8s.io/utils/net" ) // IPPart returns just the IP part of an IP or IP:port or endpoint string. If the IP // part is an IPv6 address enclosed in brackets (e.g. "[fd00:1::5]:9999"), // then the brackets are stripped as well. func IPPart(s string) string { if ip := netutils.ParseIPSloppy(s); ip != nil { // IP address without port return s }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon May 20 11:57:43 UTC 2024 - 1.3K bytes - Viewed (0) -
pkg/proxy/util/endpoints_test.go
{"1.2.3.4::9999", "", "too many colons"}, {"1.2.3.4:[0]", "", "unexpected '[' in address"}, {"1.2.3:8080", "", "invalid ip part"}, } for _, tc := range testCases { ip := IPPart(tc.endpoint) if tc.expectedError == noError { if ip != tc.expectedIP { t.Errorf("Unexpected IP for %s: Expected: %s, Got %s", tc.endpoint, tc.expectedIP, ip) } } else if ip != "" {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon May 20 11:57:43 UTC 2024 - 1.4K bytes - Viewed (0) -
pkg/proxy/conntrack/cleanup.go
for _, epSvcPair := range endpointsUpdateResult.DeletedUDPEndpoints { if svcInfo, ok := svcPortMap[epSvcPair.ServicePortName]; ok { endpointIP := proxyutil.IPPart(epSvcPair.Endpoint) nodePort := svcInfo.NodePort() var err error if nodePort != 0 { err = ct.ClearEntriesForPortNAT(endpointIP, nodePort, v1.ProtocolUDP) if err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Jan 15 18:09:05 UTC 2024 - 5.2K bytes - Viewed (0)