- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for ParseHostPort (0.17 sec)
-
cmd/kubeadm/app/util/endpoint.go
url := formatURL(localEndpointIP.String(), localEndpointPort) return url.String(), nil } // ParseHostPort parses a network address of the form "host:port", "ipv4:port", "[ipv6]:port" into host and port; // ":port" can be eventually omitted. // If the string is not a valid representation of network address, ParseHostPort returns an error. func ParseHostPort(hostport string) (string, string, error) { var host, port string var err error
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jan 11 15:08:59 UTC 2022 - 5.3K bytes - Viewed (0) -
cmd/kubeadm/app/util/endpoint_test.go
hostport: "[1200::AB00:1234::2552:7777:1313]:1234", expectedError: true, }, } for _, rt := range tests { t.Run(rt.name, func(t *testing.T) { actualHost, actualPort, actualError := ParseHostPort(rt.hostport) if (actualError != nil) && !rt.expectedError { t.Errorf("%s unexpected failure: %v", rt.name, actualError) return } else if (actualError == nil) && rt.expectedError {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Feb 23 03:19:26 UTC 2019 - 10K bytes - Viewed (0) -
cmd/kubeadm/app/util/config/initconfiguration.go
// the bindPort number of the APIEndpoint. // This will allow join of additional control plane instances with different bindPort number if cfg.ControlPlaneEndpoint != "" { host, port, err := kubeadmutil.ParseHostPort(cfg.ControlPlaneEndpoint) if err != nil { return err } if port == "" { cfg.ControlPlaneEndpoint = net.JoinHostPort(host, strconv.FormatInt(int64(localAPIEndpoint.BindPort), 10)) } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jan 05 12:41:16 UTC 2024 - 17.3K bytes - Viewed (0) -
cmd/kubeadm/app/util/pkiutil/pki_helpers.go
internalAPIServerVirtualIP, advertiseAddress, }, } // add cluster controlPlaneEndpoint if present (dns or ip) if len(cfg.ControlPlaneEndpoint) > 0 { if host, _, err := kubeadmutil.ParseHostPort(cfg.ControlPlaneEndpoint); err == nil { if ip := netutils.ParseIPSloppy(host); ip != nil { altNames.IPs = append(altNames.IPs, ip) } else { altNames.DNSNames = append(altNames.DNSNames, host) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 01 16:01:49 UTC 2024 - 25.5K bytes - Viewed (0) -
cmd/kubeadm/app/apis/kubeadm/validation/validation.go
return allErrs } // ValidateHostPort validates host[:port] endpoints func ValidateHostPort(endpoint string, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} if _, _, err := kubeadmutil.ParseHostPort(endpoint); endpoint != "" && err != nil { allErrs = append(allErrs, field.Invalid(fldPath, endpoint, "endpoint is not valid")) } return allErrs }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 01 16:01:49 UTC 2024 - 33.4K bytes - Viewed (0)