Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for ApplyFunc (0.06 sec)

  1. internal/config/dns/etcd_dns.go

    		setter(args)
    	}
    
    	if len(args.domainNames) == 0 || args.domainIPs.IsEmpty() {
    		return nil, errors.New("invalid argument")
    	}
    
    	// strip ports off of domainIPs
    	domainIPsWithoutPorts := args.domainIPs.ApplyFunc(func(ip string) string {
    		host, _, err := net.SplitHostPort(ip)
    		if err != nil {
    			if strings.Contains(err.Error(), "missing port in address") {
    				host = ip
    			}
    		}
    		return host
    	})
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Sep 26 15:03:08 UTC 2024
    - 8K bytes
    - Viewed (0)
  2. cmd/net.go

    	hostIPs, err := getHostIP(host)
    	if err != nil {
    		return false, err
    	}
    
    	nonInterIPV4s := mustGetLocalIP4().Intersection(hostIPs)
    	if nonInterIPV4s.IsEmpty() {
    		hostIPs = hostIPs.ApplyFunc(func(ip string) string {
    			if net.ParseIP(ip).IsLoopback() {
    				// Any loopback IP which is not 127.0.0.1
    				// convert it to check for intersections.
    				return "127.0.0.1"
    			}
    			return ip
    		})
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Jun 19 14:34:00 UTC 2024
    - 9.6K bytes
    - Viewed (0)
  3. cmd/endpoint.go

    			} else {
    				continue
    			}
    		}
    
    		if net.ParseIP(host) == nil {
    			IPs, err := getHostIP(host)
    			if err != nil {
    				continue
    			}
    
    			IPsWithPort := IPs.ApplyFunc(func(ip string) string {
    				return net.JoinHostPort(ip, port)
    			})
    
    			ipList = ipList.Union(IPsWithPort)
    		}
    
    		ipList.Add(net.JoinHostPort(host, port))
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jun 21 22:22:24 UTC 2024
    - 34.2K bytes
    - Viewed (0)
Back to top