- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 18 for parseAddrs (0.16 sec)
-
src/net/netip/netip.go
} // MustParseAddr calls [ParseAddr](s) and panics on error. // It is intended for use in tests with hard-coded strings. func MustParseAddr(s string) Addr { ip, err := ParseAddr(s) if err != nil { panic(err) } return ip } type parseAddrError struct { in string // the string given to ParseAddr msg string // an explanation of the parse failure
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 17:10:01 UTC 2024 - 43.2K bytes - Viewed (0) -
pilot/pkg/serviceregistry/kube/controller/ambient/workloads.go
Waypoint: waypointAddress, TrustDomain: pickTrustDomain(meshCfg), Locality: getWorkloadEntryLocality(&wle.Spec), } if addr, err := netip.ParseAddr(wle.Spec.Address); err == nil { w.Addresses = [][]byte{addr.AsSlice()} } else { log.Warnf("skipping workload entry %s/%s; DNS Address resolution is not yet implemented", wle.Namespace, wle.Name) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Jun 13 16:51:29 UTC 2024 - 20.9K bytes - Viewed (0) -
src/net/ip.go
// ParseIP returns nil. func ParseIP(s string) IP { if addr, valid := parseIP(s); valid { return IP(addr[:]) } return nil } func parseIP(s string) ([16]byte, bool) { ip, err := netip.ParseAddr(s) if err != nil || ip.Zone() != "" { return [16]byte{}, false } return ip.As16(), true } // ParseCIDR parses s as a CIDR notation IP address and prefix length,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat May 18 03:13:26 UTC 2024 - 13.9K bytes - Viewed (0) -
pkg/controller/servicecidrs/servicecidrs_controller.go
managedBy, ok := ip.Labels[networkingapiv1alpha1.LabelManagedBy] if !ok || managedBy != ipallocator.ControllerName { return []string{} } address, err := netip.ParseAddr(ip.Name) if err != nil { // This should not happen, the IPAddress object validates // the name is a valid IPAddress return []string{} } c.muTree.Lock() defer c.muTree.Unlock()
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat May 04 18:33:12 UTC 2024 - 18K bytes - Viewed (0) -
cmd/kubeadm/app/apis/kubeadm/validation/validation.go
// ValidateIPNetFromString validates network portion of ip address func ValidateIPNetFromString(subnetStr string, minAddrs int64, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} subnets, err := netutils.ParseCIDRs(strings.Split(subnetStr, ",")) if err != nil { allErrs = append(allErrs, field.Invalid(fldPath, subnetStr, "couldn't parse subnet")) return allErrs } switch { // if DualStack only 2 CIDRs allowed
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 01 16:01:49 UTC 2024 - 33.4K bytes - Viewed (0) -
pilot/cmd/pilot-agent/app/cmd.go
proxyArgs.Type = model.NodeType(args[0]) if !model.IsApplicationNodeType(proxyArgs.Type) { return fmt.Errorf("Invalid proxy Type: " + string(proxyArgs.Type)) } } podIP, _ := netip.ParseAddr(options.InstanceIPVar.Get()) // protobuf encoding of IP_ADDRESS type if podIP.IsValid() { // The first one must be the pod ip as we pick the first ip as pod ip in istiod. proxyArgs.IPAddresses = []string{podIP.String()}
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu May 16 22:12:28 UTC 2024 - 11.9K bytes - Viewed (0) -
pilot/pkg/serviceregistry/kube/controller/ambient/ambientindex_serviceentry_test.go
// entry s.assertWorkloads(t, s.addrXdsName("240.240.23.45"), workloadapi.WorkloadStatus_HEALTHY, "pod1", "name1") } func parseIP(ip string) []byte { addr, err := netip.ParseAddr(ip) if err != nil { return nil } return addr.AsSlice()
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Mar 27 03:01:04 UTC 2024 - 12.9K bytes - Viewed (0) -
pilot/pkg/serviceregistry/kube/controller/ambient/waypoints.go
ServiceAccounts: slices.Sort(serviceAccounts), } } func getGatewayAddrs(gw *v1beta1.Gateway) []netip.Addr { // Currently, we only look at one address. Probably this should be made more robust ip, err := netip.ParseAddr(gw.Status.Addresses[0].Value) if err == nil { return []netip.Addr{ip} } log.Errorf("Unable to parse IP address in status of %v/%v/%v", gvk.KubernetesGateway, gw.Namespace, gw.Name) return nil
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Jun 12 18:02:28 UTC 2024 - 11.1K bytes - Viewed (0) -
src/net/cgo_unix.go
// Local database various depends on implementation const ( nameinfoLen = 64 maxNameinfoLen = 4096 ) func cgoLookupPTR(ctx context.Context, addr string) (names []string, err error) { ip, err := netip.ParseAddr(addr) if err != nil { return nil, &DNSError{Err: "invalid address", Name: addr} } sa, salen := cgoSockaddr(IP(ip.AsSlice()), ip.Zone()) if sa == nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Apr 14 18:23:45 UTC 2024 - 11.4K bytes - Viewed (0) -
src/net/mail/message_test.go
if err != nil { t.Errorf("Couldn't parse address %s: %s", test, err.Error()) continue } str := addr.String() addr, err = ParseAddress(str) if err != nil { t.Errorf("ParseAddr(%q) error: %v", test, err) continue } if addr.String() != test { t.Errorf("String() round-trip = %q; want %q", addr, test) continue } } // Should fail
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 19 11:31:03 UTC 2024 - 30.4K bytes - Viewed (0)